Skip to content

fix(v2): comments pill → preview overlay with comments tab; fix file-detail Prev/Next history stacking#150

Merged
zjean merged 1 commit intomainfrom
fix/v2-preview-comments-handoff
May 4, 2026
Merged

fix(v2): comments pill → preview overlay with comments tab; fix file-detail Prev/Next history stacking#150
zjean merged 1 commit intomainfrom
fix/v2-preview-comments-handoff

Conversation

@zjean
Copy link
Copy Markdown
Owner

@zjean zjean commented May 4, 2026

Summary

  • Fix feat(fork): scaffolding for fork maintenance #1 — comments pill now opens the preview overlay (personal + space-files screens): openComments was routing to the heavier /v2/file full-screen route. Since the preview overlay gained its own Comments tab in mod(v2): preview — restore pdf.js, add comments tab, breathe spacing #149, the pill now calls PreviewOverlayService.open(path, file, { initialTab: 'comments' }). PreviewOverlayService gets a new PreviewOpenOptions param + a plain initialTab getter; PreviewComponent reads that getter on each path change and auto-opens the info aside when comments is requested.

  • Fix fix(ci): drop linux/arm64 build, keep amd64 only #2 — Prev/Next in file-detail no longer stacks history entries: goTo() was missing replaceUrl: true, so each sibling navigation pushed a new browser history entry. close() only walked back one entry, forcing the user to click Close once per Prev/Next pressed. Adding replaceUrl: true makes Prev/Next mutate the URL in place; Close exits in a single click.

Files changed

File Change
preview-overlay.service.ts Add PreviewOpenOptions interface, initialTab getter, extend open() signature
preview.component.ts Apply overlay.initialTab on each path change; auto-open info aside for comments
personal.component.ts openComments → overlay with initialTab: 'comments'
space-files.component.ts Same
file-detail.component.ts goTo() + replaceUrl: true

Test plan

  • Click the comments pill on a file row in /v2/personal → preview overlay opens with Comments tab active and info aside expanded
  • Click anywhere else on the same row → preview overlay opens with Info tab (existing behavior preserved)
  • Same two checks in /v2/spaces/<alias>
  • In /v2/file?path=… (direct deep-link), click Next/Prev several times → URL mutates, Close exits in a single click
  • ng lint and tsc --noEmit pass (verified locally)

🤖 Generated with Claude Code

…v history

Fix #1: openComments in personal and space-files screens was routing to
the heavier /v2/file screen. Since the preview overlay now has its own
Comments tab (#149), wire the pill to PreviewOverlayService.open() with
initialTab:'comments' instead. Extend PreviewOverlayService.open() with
a PreviewOpenOptions param; PreviewComponent reads overlay.initialTab on
each path change and auto-opens the info aside when comments is requested.

Fix #2: file-detail.component.ts goTo() lacked replaceUrl:true, so each
Prev/Next click pushed a new history entry. Close() called history.back()
once, leaving the user stuck walking through stacked file-detail entries.
Add replaceUrl:true so Prev/Next mutates the URL in place; Close exits in
one click regardless of how many siblings were navigated.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@zjean zjean enabled auto-merge (squash) May 4, 2026 20:27
@zjean zjean merged commit a878bfd into main May 4, 2026
1 check passed
@zjean zjean deleted the fix/v2-preview-comments-handoff branch May 4, 2026 20:28
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