Skip to content

feat(session): add Manage Projects to the session header, fix Schedules back navigation - #123

Merged
setkyar merged 1 commit into
mainfrom
fix/session-manage-projects-and-schedules-back
Sep 17, 2026
Merged

setkyar merged 1 commit into
mainfrom
fix/session-manage-projects-and-schedules-back

Conversation

@setkyar

@setkyar setkyar commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Two related navigation gaps on the session detail page.

1. Manage Projects on the session detail page

Manage Projects was only reachable from the index menu. It is now a control in the session header, next to the tree toggle, opening the same ProjectsModal the index uses.

  • session-modals.svelte.js gains a projects flag + openProjects(), following the existing modal pattern (cleared by resetSessionModals).
  • SessionShell mounts the modal, owns its fetch/update state, sets modal-sheet-open and handles Escape while open.
  • Toggling a project bumps projectsRevision, which remounts the sidebar's PROJECTS tab — it fetches with filtered: true, so it would otherwise keep showing the old enabled set.
  • Styling reuses the existing .session-header-schedules rules; the label collapses to an icon under 900px like its neighbours.
  • No new i18n keys (reuses 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. SchedulesPage hardcoded navigate('/'), but /schedules has three entry points.

  • shared/navigation.js: navigate() / handleNavClick() accept a history state, plus a backState() helper recording the origin URL.
  • The three entry points (session header, session command menu, index header) push { back: <origin> }.
  • The back button follows that state, falling back to / for direct deep links; the label switches between common.back and session.back accordingly.

Testing

  • make check green.
  • Unit tests: SessionHeader.test.js (header control opens the sheet; schedules link pushes back state), CommandMenu.test.js, new SchedulesPage.test.js covering both back paths.
  • E2E: extended the schedules session-header test to click back and assert it returns to /session?id=; full Playwright suite passes (one pre-existing steer-queue flake, passes on re-run).

…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.
@setkyar
setkyar merged commit a16687e into main Sep 17, 2026
6 checks passed
@setkyar
setkyar deleted the fix/session-manage-projects-and-schedules-back branch September 17, 2026 10:20
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.

1 participant