Skip to content

feat(server): remove the embedded viewer - #6

Open
NivGreenstein wants to merge 1 commit into
masterfrom
feat/remove-viewer
Open

feat(server): remove the embedded viewer#6
NivGreenstein wants to merge 1 commit into
masterfrom
feat/remove-viewer

Conversation

@NivGreenstein

@NivGreenstein NivGreenstein commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Closes MAPCO-11482. Docs half: MapColonies/shigola-docs#2

Shigola serves tiles, not a map. The viewer route, the embedded UI, the build tags that excluded it,
and the viewer half of the observability interface all go.

Sequenced first among the surface removals, as the ticket asked: the viewer consumed both the
capabilities endpoints and the native /maps/... routes, so removing those first would have left it
broken in passing rather than removed on purpose.

What went

Routes setupViewer and both its build-tagged implementations
Assets ui/ — the Vue app, its go:embed wrapper, and the go:generate that shelled out to npm
Build tags noViewer, and the generated files registering it
Observability ViewerObserver, InstrumentViewerHandler, and both implementers
Metrics the whole shigola_viewer_* family
CI the test job's UI step, the release workflow's build_ui job, its ui artifact, and the ui input on shigola-setup-env

The only go:generate left in the tree is the build-tag one, which needs nothing but Go. Nothing
in the build needs node any more.

Three things reviewers should look at

1. A near-miss that PR CI could not have caught. Dropping the ui: true input emptied five
with: blocks in on_release_publish.yml. A bare with: parses as YAML null, which GitHub's
workflow schema rejects — invalidating the entire release workflow. on_pr_push.yml never
exercises that file, so CI would have stayed green and the next release would simply have failed to
parse. Those with: lines are removed rather than left empty; both workflows and the composite
action are verified to parse.

2. The CI scope is deliberately wider than the ticket. The AC names only "the CI step … in the
test job". But the release workflow had a whole build_ui job feeding seven downstream jobs through
a ui artifact. Removing only the test step would have left every release build waiting on an
artifact no job produces, so both halves are gone.

3. The docs do not announce the removal. They simply stop mentioning a viewer. There is no
stable release to upgrade from, so there is nobody a migration note would address, and documenting
an absence only raises a question the reader did not arrive with. This deliberately does not satisfy
the ticket's "noted as a breaking dashboard change" wording — see the note on the ticket.

4. Four generated files here are not about the viewer. AC 4 requires the build-tag files be
"regenerated rather than hand-edited". Regenerating revealed that the committed set was stale:
noGCSCache and noHanaProvider exist in the tree (atlas/cache_gcs.go, atlas/provider_hana.go)
but had never been registered. So no_gcs_cache / no_hana_provider pairs appear here. Pruning them
back by hand would be precisely the hand-editing the AC and CLAUDE.md forbid. shigola version now
reports them, and README's build-tag list — which had never documented either — is corrected to match.

On ADR-0003

AC 7 asks that ADR-0003, which placed the viewer at its own path, be amended. There is no ADR
register.
ADR-0001 through ADR-0009 are referenced only from code comments; nothing defines
them in either repo, and a Confluence search found nothing. What is amended here is therefore the
four in-code comments citing ADR-0003. If the register lives somewhere I could not see, it still
needs the real amendment — please say where.

Verification

  • Test proven red before green. server/ogc_mount_test.go previously asserted the /viewer
    /viewer/ redirect; it now asserts 404 on /viewer, /viewer/ and /viewer/index.html
    through a real server.NewRouter. All three failed with 301 before the removal.
  • cmd/shigola and cmd/shigola_lambda build; cmd/shigola also builds with CGO_ENABLED=0.
  • go build -tags noViewer still succeeds — the tag is simply inert now.
  • Full suite green in both CGO modes, gofmt -s clean, all four workflow/action YAML files parse.
  • The OGC CITE conformance job runs on this PR (it touches server/server.go and server/ogc/**),
    independently checking the OGC surface still conforms.

Pre-existing failures, not from this change

cmd/shigola/cmd/cache TestValidateTileInGrid/a_zoom_beyond_the_scheme's_matrices and server/ogc
TestTile/a_matrix_the_scheme_does_not_have fail on master today — confirmed by stashing this
branch and re-running. Separately, cache/file TestExpiration failed once under full-suite load
and passes 3/3 in isolation on both master and this branch: a timing flake. All three want their
own ticket.

Deliberately left

CHANGELOG.md's viewer entries are upstream history and are untouched. LICENSE.md's attribution
keeps every word except naming the viewer among what this codebase contains — it no longer does.

🤖 Generated with Claude Code

@coveralls

coveralls commented Aug 25, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 0

Coverage increased (+0.06%) to 47.744%

Details

  • Coverage increased (+0.06%) from the base build.
  • Patch coverage: 6 uncovered changes across 2 files (3 of 9 lines covered, 33.33%).
  • 1 coverage regression across 1 file.

Uncovered Changes

File Changed Covered %
internal/build/not_no_hana_provider.generated.go 4 0 0.0%
internal/build/not_no_gcs_cache.generated.go 2 0 0.0%
Total (3 files) 9 3 33.33%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
internal/observer/null.go 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 20099
Covered Lines: 9596
Line Coverage: 47.74%
Coverage Strength: 206.57 hits per line

💛 - Coveralls

Shigola serves tiles, not a map. The viewer route, the embedded UI assets, the
build tags that excluded them, and the viewer half of the observability
interface all go.

This is sequenced first among the surface removals because the viewer consumes
both the capabilities endpoints and the native /maps/... routes. Removing those
first would have left it broken in passing rather than removed on purpose.

What goes with it:

- The /viewer routes, and setupViewer along with the noViewer build tag that
  chose between the two implementations. There is no tag left to set: passing
  -tags noViewer now builds exactly the same binary.
- ui/, the Vue application and its go:embed wrapper, and the go:generate
  directive that shelled out to npm to build it. The only go:generate left in
  the tree is the build-tag one, which needs nothing but Go.
- The build_ui job in the release workflow, the ui artifact it published, the
  seven jobs that waited on it, and the `ui` input on shigola-setup-env that
  downloaded it. The ticket named only the test job's step; leaving the release
  half would have had every build job waiting on an artifact no job produces.
- ViewerObserver, InstrumentViewerHandler, and the shigola_viewer metric family.

Dropping that `ui` input emptied five `with:` blocks. A bare `with:` parses as
null, which GitHub's workflow schema rejects outright, and on_pr_push.yml does
not exercise the release workflow -- so PR CI would have stayed green and the
whole release would have failed to parse the next time it ran. Those `with:`
lines are removed rather than left empty.

The docs simply stop mentioning a viewer, rather than announcing that one was
removed. There is no stable release to upgrade from, so there is nobody for a
migration note to address; documenting an absence would only raise a question
the reader did not have.

The generated build-tag files are regenerated rather than hand-edited, which is
also why this commit adds no_gcs_cache and no_hana_provider files: those tags
exist in the tree and the committed generated set had gone stale without them.
Pruning that back by hand would be the hand-editing the generated files warn
against. `shigola version` now reports them, so README's build-tag list -- which
had never mentioned either -- is corrected to match.

ADR-0003 recorded the landing page displacing the viewer to /viewer. There is no
ADR register in this repository -- ADR-0001 through ADR-0009 are referenced only
from code comments -- so what is amended here is the four comments that cite it.
Those comments keep the history, because the reason "/" is unconditional now is
not self-evident from the code.

MAPCO-11482

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants