Repository navigation
Start the editor at the data's extent, and choose imagery that covers it - #182
Merged
Merged
Conversation
With no map location in the URL, the editors opened at zoom 2 over 0,0. Fetch the workspace's bbox first and put a location that fits it in the URL for the editor to start from. A location already in the URL is kept, and an empty workspace or a failed lookup keeps the editor's default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The background was chosen by what covers the middle of the view, so local imagery covering only part of a workspace could win and leave the rest of it black. Check imagery against points across the workspace's extent, and prefer what covers all of them, falling back to the old choice when nothing does or the extent can't be fetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Background imagery now comes from, in order: the URL's background=, the imagery the user last picked for this workspace in this browser, then our pick from imagery covering the whole workspace. A URL or saved choice only has to cover the center of the view, so a deliberate partial-coverage choice like county imagery stays. Adding a start location to the URL also keeps the rest of its hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Choosing a background now fetches the workspace's extent, so these tests loaded services/index, whose caches open IndexedDB. The rejections failed the run even though the tests passed. Stub the client they need. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeffmaki
added a commit
that referenced
this pull request
Oct 30, 2026
Follow-up to #182, whose branch got this commit just after it merged. Custom imagery declares no coverage, so #182's check treated it as worldwide. A custom layer chosen on one workspace then followed the user into workspaces it doesn't cover, and left them black. - **We never pick custom imagery.** Only someone choosing it for that workspace, or a `background=` in the URL, can show it. A new workspace resets to imagery covering its whole extent. - **A custom pick keeps its own template.** Rapid has one custom slot, so setting a different custom URL on another workspace would otherwise change this one. - **`CLAUDE.md`** gets a "Background imagery" section with the order for choosing imagery. A custom layer chosen for a workspace always sticks there, since we can't tell whether it covers the area. **Testing:** only against fake imagery, not real Rapid. Lint, the type check and unit tests pass with CI's commands. In e2e, everything passed except the two sign-in tests that hard-code `localhost:3000`, because the suite ran on port 3100 beside a dev server; CI's run on 3000 is the full check. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the editors open somewhere useful, and stops black tiles when imagery covers only part of a workspace.
Start at the data's extent
#map=in the URL, the editors opened at zoom 2 over 0,0. The page now fetches the workspace's bbox and puts a location that fits it in the URL before the editor loads, so it works for Rapid 2, Rapid 3 and the Pathways editor.background=, is kept.Background imagery order
The background was chosen by what covered the middle of the view, so local imagery covering part of a workspace could win and leave the rest black (King County ortho on Sound Transit: tiles outside the county return HTTP 400 or solid black). It now comes from, in order:
background=in the URL, if it covers the center of the view.Picks are saved per workspace in the browser's local storage, from the Background pane only, so they don't follow a user to another computer.
Known limitation: Rapid doesn't draw workspace data below zoom 12, so a workspace that only fits at a lower zoom opens showing the area but none of its data until you zoom in.
Testing
localhost:3000, because the suite ran on port 3100 beside a dev server; CI's run on 3000 is the full check.🤖 Generated with Claude Code