Repository navigation
Conversation
Add clear button and improve dataset picker behavior: introduce inputRef, showClearButton, clearSelection(), and hasUnfilteredResults to better handle clearing, focus/blur, and reloading of results; adjust load/select/close logic and add styles for the clear control. Enhance workspace create pre-check composable: expose checking ref, make check() return the backend result (WorkspaceCreateCheck | null), and ensure proper in-flight tracking and cleanup. Update the TDEI create page to show a permission-checking spinner, disable the create button while checking, and call the check before initiating creation. Add unit tests for DatasetPicker and extend useWorkspaceCreateCheck tests to cover checking state and manual invocation.
- Rows run from the highest level_index down through 0 to the negative ones, with levels lacking an index or outline last, and each row shows its level_index. Moving a level still renumbers correctly: higher in the list means a higher floor. - "Street / No level" is now just "No level". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- The create pages said only OpenSidewalks files could be imported, but GTFS Pathways files can be too. - Test that level_index values like 0.0 and 1.0 read as 0 and 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rapid's close_nodes check only tells points apart by OSM's level and layer tags, so on pathways workspaces it warned about stops stacked on different floors, and about a station beside a generic node. Allow points with different level_ids or location_types to share a spot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A level with no outline or no level_index now shows an error icon on its row, which stays below the numbered levels. - A pathway with no stops at its ends was listed nowhere; it's on no level, so it now appears under "No level". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Levels with stops but no outline were only outlined on first opening the editor, and not at all if Rapid offered to restore unsaved edits. Outline them after every whole-workspace load, and after the restore prompt is dismissed or a restore finishes, never during one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moving any level also numbered every level with a shape but no level_index, which cleared their errors without anyone choosing a number. Now only the moved level takes a number from its position. 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>
### Changes Implemented * **Permission Validation on Create:** Clicking "Create Workspace" now calls the permission check API first, blocking creation and displaying the server reason if permission is denied. * **In-Flight Visual Feedback:** The button displays a spinner with "Checking permissions..." and an informational banner while the check API runs. * **Dataset Clear Button:** Added a one-click clear (`✕`) button inside the dataset picker to easily reset selected or typed text. * **Dataset Picker Reset on Focus:** Re-focusing the dataset input after an unmatched search automatically restores the full list of datasets instead of staying stuck on "No datasets found". ### Test Steps 1. **Test Dataset Clear & Recovery:** * Go to `/workspace/create/tdei` and select a Project Group. * Type non-existent text in the Dataset field to trigger "No datasets found", click outside the field, then click back into it — verify all datasets reappear. * Select a dataset and click the `✕` button — verify the field clears and the dropdown resets. 2. **Test Denied Creation (Restricted User / Dataset):** * Select a dataset where you do not have creation access. * Click **Create Workspace** — verify the button briefly says "Checking permissions...", creation stops, and a red error banner shows the denial reason. 3. **Test Successful Creation (Authorized User):** * Select a valid dataset where you have creation access. * Click **Create Workspace** — verify "Checking permissions..." briefly appears, the check succeeds, and the workspace is created successfully. <img width="1470" height="956" alt="Screenshot 2026-10-29 at 6 06 39 PM" src="https://github.com/user-attachments/assets/ac027076-26e0-4f9f-9c2a-95d39e751397" /> <img width="1470" height="956" alt="Screenshot 2026-10-29 at 6 06 41 PM" src="https://github.com/user-attachments/assets/fed881dd-92c7-469a-9189-63b6bcca2914" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary - Added a clear button and focus/blur handling to `DatasetPicker`. The picker reloads the full dataset list when needed, including after an unmatched search. - Updated `useWorkspaceCreateCheck` to expose `checking` and `check`. The check returns the backend result when available and ignores stale results. - Updated the TDEI workspace creation flow to check permissions before starting creation. The page displays a checking status, disables the create button during the check, and displays the denial reason when creation is not allowed. - Added unit tests for dataset picker behavior and permission-check state and invocation. Test execution results were not provided. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
The export kept the first outline's tags, losing whatever the others said, and an outline with no level_index wiped the original's. Outlines now fill in each other's blanks and the original's, and ones that disagree stop the export with a message naming them. The editor flags any level with more than one outline, since it's one row in levels.txt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
- A pathway with no stops at its ends has no station, and the No station group had no contents list, so these were still shown nowhere. It now expands like No level, and shows when only such a pathway is there. - A row no longer repeats a name equal to the level_index. - Test the close-points filter with points differing only by level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it (#182) Makes the editors open somewhere useful, and stops black tiles when imagery covers only part of a workspace. **Start at the data's extent** - With no `#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. - A location in the URL is kept. An empty workspace or a failed lookup keeps the editor's default. The rest of the hash, such as `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: 1. `background=` in the URL, if it covers the center of the view. 2. The user's saved pick for this workspace, if it covers the center of the view. Partial coverage is fine because they chose it. 3. Our pick, only from sources covering the whole extent (nine points across the bbox): the current imagery, then the area's best, then the first. Worldwide sources count as full coverage. 4. If nothing covers the whole extent, what 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** - Tried on Stage in real Rapid 3: Sound Transit now chooses Bing Aerial instead of King County ortho. - Not yet tried in real Rapid: picks sticking across loads, start at extent, and Rapid 2. These have unit and e2e tests against fake editors. - Lint and all unit tests pass. 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)
Custom imagery declares no coverage, so it counted as worldwide and followed the user into workspaces it doesn't cover. Only a choice can show it now. Rapid has one custom slot, so a saved custom pick keeps its own template. Document the imagery order in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Makes the Stations panel read like a building, and flags levels that GTFS can't export properly. **Level rows** - Rows run from the highest `level_index` down through 0 to the negative ones. Dragging and the arrow keys still renumber correctly: higher in the list means a higher floor. The services keep their lowest-first order, so the validators and level dropdowns are unchanged. - Each row shows its `level_index`, or `–` if it has none. A row doesn't repeat a `level_id` that equals the index, or a name that equals the ID. - A level with no outline or no `level_index` has a red error icon explaining why, and sits below the numbered levels. It gets a number when that level itself is moved; moving another level leaves it blank, so the error stays until someone chooses. - "Street / No level" is now "No level". It lists nodes with no `level_id` and the edges touching them. - "No station" expands the same way. A pathway with no stops at either end used to appear nowhere and is now listed there. **Automatic outlines** - Levels with stops but no outline were only outlined on first opening the editor, and not at all if Rapid offered to restore edits. They're now outlined after every whole-workspace load, including workspace switches, and after the restore prompt is dismissed or a restore finishes. It never runs during a restore. - A level still gets one outline, however many stations use it, so the POSM hierarchy matches `levels.txt`. A shared level across distant stations keeps its large box and its "N km across" warning, which can be ignored. **Exporting levels without losing data** - `levels.txt` kept the first outline's tags when a `level_id` had several, dropping whatever the others said, and a blank `level_index` wiped the original dataset's value. Outlines now fill in each other's blanks and the original's, and `1` and `1.0` count as the same index. - **Behavior change:** outlines that really disagree on `level_index` or `level_name` now stop the export (Download and TDEI), with an error naming the level and values. A workspace with such outlines today won't export until they're fixed. **Validation** - A level with more than one outline gets a warning, which says when the conflict will block export. - Pathways workspaces no longer get Rapid's "Point is too close to Station" warning for points with different `level_id`s or `location_type`s, since Rapid only compares OSM's level and layer tags. TDEI's `tdei_stops_share_position` is unchanged: it allows different levels but not different types on one level, and it's INFO only. **Create pages** - The file import text now says "OpenSidewalks or GTFS Pathways". **Testing** - Tried on Stage data in real Rapid 3: level order, dragging and "No level". - Not tried in real Rapid: the outlining after restores and workspace switches, numbering a moved blank level, the "No station" contents, and the repeated-outline warning. These have unit tests against a fake editor. - The export changes have unit tests only. - Lint and all unit tests pass. 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)
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)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This branch was previously deployed
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.
No description provided.