feat(session): add Manage Projects to the session header, fix Schedules back navigation - #123
Merged
Merged
Conversation
…es back
The manage-projects sheet was reachable only from the index menu, and the
Schedules page's back button always went to the index even when opened from
a session.
Session header now carries a Manage Projects control next to the tree toggle
that opens the same ProjectsModal the index uses. Toggling a project bumps a
revision that remounts the sidebar's PROJECTS tab, which fetches with
filtered=true and would otherwise show the old enabled set.
/schedules is reachable from the index and from a session, so its entry points
push { back: <origin url> } as history state and the back button follows it,
falling back to the index for direct deep links.
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.
Two related navigation gaps on the session detail page.
1. Manage Projects on the session detail page
Manage Projectswas only reachable from the index⋯menu. It is now a control in the session header, next to the tree toggle, opening the sameProjectsModalthe index uses.session-modals.svelte.jsgains aprojectsflag +openProjects(), following the existing modal pattern (cleared byresetSessionModals).SessionShellmounts the modal, owns its fetch/update state, setsmodal-sheet-openand handles Escape while open.projectsRevision, which remounts the sidebar's PROJECTS tab — it fetches withfiltered: true, so it would otherwise keep showing the old enabled set..session-header-schedulesrules; the label collapses to an icon under 900px like its neighbours.index.manageProjects/index.manageProjectsTitle), so no locale regeneration.2. Schedules back button
Opening Schedules from a session and pressing back landed on the index instead of the session.
SchedulesPagehardcodednavigate('/'), but/scheduleshas three entry points.shared/navigation.js:navigate()/handleNavClick()accept a historystate, plus abackState()helper recording the origin URL.{ back: <origin> }./for direct deep links; the label switches betweencommon.backandsession.backaccordingly.Testing
make checkgreen.SessionHeader.test.js(header control opens the sheet; schedules link pushes back state),CommandMenu.test.js, newSchedulesPage.test.jscovering both back paths./session?id=; full Playwright suite passes (one pre-existingsteer-queueflake, passes on re-run).