Skip to content

Fix touch icon sizing in file and attachment previews - #2780

Merged
ymichael merged 1 commit into
mainfrom
bb/investigate-undersized-copy-icon-thr_mdsgnhxu77
Aug 31, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/investigate-undersized-copy-icon-thr_mdsgnhxu77

Conversation

@ymichael

@ymichael ymichael commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Narrow coarse-pointer layouts did not have surface-specific icon sizing. The File Preview copy action remained a 20px target with a 12px glyph beside existing 36px/20px header actions, while attachment remove controls coupled their visible treatment and layout footprint to their hit target. A global icon-sizing rule would overcorrect dense surfaces and require unrelated core and plugin controls to opt into or out of that policy.

What changed

  • Size the File Preview copy and open-in-editor actions to the existing 36px target and 20px glyph treatment on narrow coarse pointers.
  • Enlarge the tab close target only for the three core file-preview tab kinds; browser, terminal, and plugin tabs retain their existing behavior.
  • Give image and file attachment remove controls a compact 28px coarse-pointer hit target while preserving the 16px visible affordance and file-chip layout footprint.
  • Keep the change app-core only. There are no plugin, Plugin SDK, shared global sizing, host protocol, CLI, guide, or documentation changes.

How you verified

  • Added focused regression coverage that fails without the surface-specific classes and file-preview opt-in.
  • pnpm exec turbo run test --filter=@bb/app -- --run src/components/promptbox/AttachmentPreview.test.tsx src/components/secondary-panel/FilePreview.test.tsx src/components/secondary-panel/SecondaryPanelTabStrip.test.ts src/components/ui/tab-pill.test.tsx (34 tests passed).
  • pnpm exec turbo run typecheck --filter=@bb/app.
  • pnpm exec turbo run lint --filter=@bb/app (0 errors; 173 pre-existing warnings).
  • git diff --check origin/main...HEAD.
  • Used the dev browser at a narrow coarse-pointer viewport and captured honest before/after screenshots for both affected surfaces. File Preview moved from a 20px/12px copy control to 36px/20px, matching its neighboring actions; attachment removal moved from a 16px target to a 28px target while keeping a 16px visible control and unchanged chip layout.

Fixes: no linked issue.

AGENT GENERATED

@ymichael
ymichael merged commit bac61f5 into main Aug 31, 2026
15 checks passed
@ymichael
ymichael deleted the bb/investigate-undersized-copy-icon-thr_mdsgnhxu77 branch August 31, 2026 23: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