fix(web): apply Manage Projects filter to the session sidebar - #108
Merged
Conversation
Introduce web/src/shared/keybindings.js: a single source of truth for the remappable global/navigation/composer shortcuts, plus matcher helpers. Migrate the five inline handlers (keyboard-nav, session-globals, SessionsPage index, search-filters, textarea-controls) to ask the registry `matchesAction(id, e)` instead of hardcoding `e.key === …` / modifier checks. Pure refactor — defaults are unchanged and no override loading exists yet, so behavior is identical. All 722 frontend tests pass with no changes to the existing handler tests, confirming parity. Structural modal keys (Escape, arrows, Tab focus-traps), Enter-to-submit, and the multi-key `g g` sequence are intentionally left hardcoded; they are UI affordances, not preferences. Groundwork for #43 (customizable shortcuts). The settings UI, override persistence, conflict detection, and modal reflection land in a follow-up PR stacked on this one.
On layouts where '/' is a shifted key (German, French, ...), Cmd+/ arrives with shiftKey=true and the strict modifier check made the shortcuts-help binding unreachable. Shift is now only enforced where it changes meaning: letters and named keys like Tab. For punctuation, event.key is already the shifted result, so an unrequested Shift is layout noise.
GET /api/projects now accepts filtered=1, which applies the enabled-projects allowlist server-side (so pagination and totals stay correct) while always keeping the current session's project visible. The sidebar Projects tab and the Sessions tab's project switcher pass the flag; the Manage Projects modal keeps fetching the full list. Fixes #107
daveyijzermans
pushed a commit
to daveyijzermans/pi-web
that referenced
this pull request
Aug 23, 2026
Default E2E matrix now runs only Desktop Chrome + Mobile Chrome (Pixel 5) for fast PR feedback. Full 7-project matrix (Firefox, Safari, iPad) runs on pushes to main via E2E_FULL_MATRIX=1 env var. Closes ygncode#108
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.
Fixes #107
The homepage hides sessions from disabled projects when the Manage Projects master filter is on, but the session sidebar's Projects tab (and the Sessions tab's project switcher) fetched the unfiltered
GET /api/projectslist, so disabled projects still appeared there.Changes
internal/server/projects.go):GET /api/projectsacceptsfiltered=1. When the master filter is on, disabled projects are dropped before pagination sototaland offsets stay correct. The project passed ascurrentis always kept, so the project you're currently in never disappears from the sidebar. Without the param (Manage Projects modal) or with the filter off, behavior is unchanged.defaultFetchProjectsgained afilteredoption;SessionSidebarProjects.svelteand theSessionSidebarSessions.svelteproject switcher passfiltered: true. Expanding a kept-but-disabled current project still works because per-project session loads use/api/sessions?project=X, which bypasses the filter by design.TestHandleApiProjectsFiltered(filter off no-op, no param unfiltered, disabled dropped with adjusted total, disabled current project kept and sorted first); updatedfetchProjectsarg assertions inSessionSidebarProjects.test.js.docs/architecture/system-overview.mdand the/api/projectsrow indocs/architecture/backend.md.make checkpasses (lint, format-check, vitest + go test, build, vet).