Skip to content

Polish session tag click areas, filters and new-session tags - #2

Merged
jeroendee merged 1 commit into
mainfrom
feature/session-tags-polish
Oct 21, 2026
Merged

jeroendee merged 1 commit into
mainfrom
feature/session-tags-polish

Conversation

@jeroendee

@jeroendee jeroendee commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Three small follow-ups to the session-tag feature:

  • Clicking blank space beside a session's tags opens/selects that session, without changing tag-button behavior.
  • Filter-option hover paint reaches the right edge instead of leaving a reserved scrollbar strip.
  • New in the Sessions header carries all active filter tags through the normal folder picker. Tags are validated and saved in the initial creation transaction, not a follow-up patch. Invalid/over-limit tags create no partial session.

Existing no-filter creation, folder/worktree options, row actions, modifier selection and mobile hold actions are preserved. Unrelated text or Archived constraints can still hide a new session.

This PR targets jeroendee/pi-pocket:main for inspection. It contains only the polish commit; it does not update upstream PR #118 or its source branch.

Placement

Core under C2/C5: this corrects existing native session-list interactions and stores initial shared metadata through the existing authorized creation path. No new extension, setting, document kind or migration.

Proof

Revision: 7a264a3de67f3f2a69d1d9dc56c94d9477f4698e (one commit above the feature already merged into fork main). Real local PocketApp, HTTP routes and browser assets, isolated synthetic data, scripted model; Chromium desktop and phone-size emulation. No mocked application behavior or live session data.

Scenario Expected → observed Evidence
Blank tag-row area Opens the intended session at 1280/390/320px; Ctrl-click selects; tag chips still filter/select independently Real pointer regressions and native demo/screenshots below
Existing hold/actions Hold opens native actions, release does not navigate, dismissal restores row-button focus; existing hover/action hit targets remain safe New hold/focus tests plus existing tag UI suite
Filter hover Right edge belongs to the option, with no idle gutter Before: measured 10px gap. After: below 1px, real hovered option owns the right-edge point; screenshot below
Filtered New Select 2 tags → Done → header New → folder picker Open → new session appears with both tags Native desktop/390×844/320×500 journeys, actual creation request and stored metadata assertions, screenshots/demo below
Persistence/defaults Reload retains inherited tags; no-filter New stays untagged; restart retains stored tags UI reload tests and real-storage reopen regression
Failure boundary All 11 active tags reach validation; 409 reports the limit, leaves the picker usable and filters intact, creates no session and makes no tag-patch request Native UI regressions at all 3 sizes plus backend input/permission tests

The 22-second native demo below shows all 3 interactions. It samples real browser screenshots at 5fps and encodes at 10fps; no application behavior is simulated.

API example, commands and observed results

The existing POST /api/sessions request adds optional tags: string[]; cwd, title and worktree retain their existing meaning. Response shape stays { id: number }. The demo's actual creation returned HTTP 200 and opened session 29; its server metadata and visible row both contained polish and review.

Equivalent call for that isolated fixture (temporary server now stopped):

curl -X POST http://127.0.0.1:38617/api/sessions \
  -H 'Authorization: Bearer <fixture-token>' \
  -H 'X-Pocket: 1' -H 'Content-Type: application/json' \
  -d '{"cwd":"/tmp/pi-pocket-test-sL32vU/work","tags":["polish","review"]}'
# HTTP 200; response shape: {"id":29}

The displayed command is an equivalent example, not a separately executed curl call; the native UI issued the demonstrated request. Initial names are normalized with the existing rules. Over 10 canonical tags returns 409; malformed tags return 400. Viewer/scoped creation and missing X-Pocket remain 403. Tests verify no session is created on rejection.

npm run format, npm run lint, npm run check, web-module syntax checks and git diff --check pass.

The complete npm test run passed on the byte-identical candidate immediately before commit; the 12 changed-file hashes were verified against the committed files. An earlier tool-limited invocation stopped after 300 seconds; the completed background run is the result reported here:

ℹ tests 439
ℹ pass 439
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 649702.219278

After commit, npm run check, npm run lint and all 17 new regressions were rerun on this exact revision:

node --test test/session-tag-creation.test.ts \
  test/session-tag-creation-ui.test.ts \
  test/session-tags-polish-ui.test.ts
ℹ tests 17
ℹ pass 17
ℹ fail 0
ℹ skipped 0
ℹ duration_ms 101365.249157

Before repair, the new regressions reproduced non-opening blank space, failed Ctrl-selection, the 10px hover gap, missing inherited/persistent initial tags and invalid initial tags wrongly accepted. The same relevant assertions now pass. Existing atomic tag, worktree and tag/filter UI tests also pass.

Limits: local integration evidence, not CI or production rollout. Mobile input is Chromium emulation; physical devices, other engines and screen readers were not audited. No live app, existing preview or upstream PR was changed. The short video is a demonstration; the tests establish the failure boundaries and persistence checks beyond what the video shows.

session-tags-polish-22s.mp4

Native filter row hover reaches the right inner edge

New session persists both active filter tags and remains in the matching list

390px native mobile-emulation result with inherited tag filters

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