refactor(web): Gallery absorbs FilesHub — one file surface, slim port#626
Merged
Conversation
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.
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.
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):sessionId/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 tofileHubCore./filesbehavior is byte-identical (scratch default off, URL params unchanged).Validation
build:ci, 859 web unit tests (incl. new coverage: star round-trip, label add/remove, entry-ref chips, MarkupPane session-gating, apply-markup derivation)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