Skip to content

refactor(web): Gallery absorbs FilesHub — one file surface, slim port#626

Merged
gbasin merged 1 commit into
masterfrom
refactor/gallery-absorbs-fileshub
Jul 21, 2026
Merged

refactor(web): Gallery absorbs FilesHub — one file surface, slim port#626
gbasin merged 1 commit into
masterfrom
refactor/gallery-absorbs-fileshub

Conversation

@gbasin

@gbasin gbasin commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Deletes FilesHub.tsx (1,422 LOC; net −981) after porting the approved capability set into Gallery, ending the two-file-surfaces split. Slim-port scope decided with Gary (no folders, no origin/mediaKind text filters; both markup features kept):

  • Star toggle + label add/remove on tiles — Gallery's starred/label filters were previously fed only by editing affordances hidden in the detached FilesHub tab; the main surface is now self-sufficient
  • Entry-reference chips + lightbox sessionId
  • Apply-markup (CriticMarkup → "Apply with agent") and the inline MarkupPane ("Mark up and send to agent"), both session-gated exactly as before
  • Restore for tombstoned files
  • Detached /s/:id/work/hub-files (slug unchanged) renders session-scoped Gallery (defaultScope="session", defaultIncludeScratch)

Deliberate semantic change: the detached view lists files by server-side session scope (files the session captured) instead of FilesHub's client-side touched-path filter over the channel corpus. Empty sessions get a "No files yet" state with a See all workspace files escape + the scope dropdown. Flagged for review.

hubFileToPreview/fileMatchesSessionScope/scope types moved to fileHubCore. /files behavior is byte-identical (scratch default off, URL params unchanged).

Validation

  • lint, web typecheck, build:ci, 859 web unit tests (incl. new coverage: star round-trip, label add/remove, entry-ref chips, MarkupPane session-gating, apply-markup derivation)
  • Full local e2e 120/120, exit 0
  • Hands-on browser QA against a seeded demo workspace (isolated DB, built bundle + vite preview): star toggle + reload persistence + starred-only filter, label add/remove via tile chips, detached session view (empty state + captured-artifact listing), MarkupPane open, Apply-with-agent on a planted CriticMarkup file, Mark-up correctly absent outside session scope, zero page errors across all flows

Deletes FilesHub (1,422 LOC) after porting the approved capability set
into Gallery:

- star toggle + label add/remove on tiles (Gallery's starred/label
  FILTERS were previously fed only by a surface hidden behind the detach
  control — they're now self-sufficient)
- entry-reference chips + lightbox sessionId
- apply-markup (CriticMarkup detection -> Apply with agent) and the
  inline MarkupPane editor, both gated on session scope exactly as before
- restore affordance for tombstoned files

The detached /s/:id/work/hub-files route (slug unchanged) renders
session-scoped Gallery (defaultScope=session, defaultIncludeScratch).
Deliberate semantic change: that view now lists files by server-side
session scope (files the session captured) instead of FilesHub's
client-side touched-path filter over the whole channel corpus; the empty
state offers 'See all workspace files' and the scope dropdown escapes to
channel/everything. Folder navigation and origin/mediaKind text filters
are consciously dropped (approved): flat grid + filters everywhere.

hubFileToPreview/fileMatchesSessionScope/scope types relocated to
fileHubCore; /files behavior unchanged (scratch default stays off, URL
params identical).

Slim-port decisions approved by Gary 2026-07-21 (audit doc:
docs/archive/notes/2026-07-19-dead-code-audit.md).

Validation: lint, web typecheck, build:ci, 859 web unit tests; full
local e2e 120/120; hands-on browser QA against a seeded demo workspace
verified star round-trip + persistence, starred-only filter, label
add/remove, session-scoped detached view + empty state, MarkupPane
('Mark up and send to agent'), and Apply-with-agent on a CriticMarkup
file — zero page errors.
@gbasin
gbasin added this pull request to the merge queue Jul 21, 2026
Merged via the queue into master with commit f82cf2d Jul 21, 2026
19 checks passed
@gbasin
gbasin deleted the refactor/gallery-absorbs-fileshub branch July 21, 2026 06:05
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