Skip to content

Move the mobile attachment remove button onto the thumbnail and open a lightbox - #2132

Merged
SawyerHood merged 1 commit into
mainfrom
bb/improve-attachment-close-button-thr_cj28wdq58v
Aug 21, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/improve-attachment-close-button-thr_cj28wdq58v

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

What was wrong

Image attachments in the mobile composer rendered as a pill: the thumbnail sat next to a gray X in a bordered frame. This looks different from the ChatGPT style the user asked for (a small X in the corner of the picture). A tap on the thumbnail did nothing, so there was no way to see the full picture before you send it.

What changed

apps/mobile/src/composer/AttachmentChips.tsx:

  • Image attachments are a 64px rounded thumbnail with a small dark circle remove button in the top-right corner (white X, black/white like the lightbox chrome so it reads on any photo).
  • A tap on the thumbnail opens the existing mobile ImageLightbox (pinch zoom, swipe, previous/next, counter) with all image attachments in the strip.
  • A pending upload with a preview uses the same rounded thumbnail with the spinner overlay.
  • File chips keep the pill style with the X on the right.

No wire changes.

How you verified

  • pnpm exec turbo run typecheck --filter=@bb/mobile and pnpm exec turbo run lint --filter=@bb/mobile pass.
  • Ran the dev client on an iPhone 17 Pro simulator (iOS 26.3) against this worktree's dev server, attached two library photos, and opened the lightbox from a thumbnail. Screenshots:
Composer Lightbox
two rounded thumbnails with a corner X full-screen image, 1 / 2 counter, previous/next

AGENT GENERATED: by Claude Opus 5

…a lightbox

Image attachments in the mobile composer now render as a rounded
thumbnail with a small remove button in the top-right corner, and a tap
on the thumbnail opens the shared ImageLightbox.

Co-Authored-By: Claude <[email protected]>
@SawyerHood
SawyerHood merged commit 703213a into main Aug 21, 2026
13 checks passed
@SawyerHood
SawyerHood deleted the bb/improve-attachment-close-button-thr_cj28wdq58v branch August 21, 2026 03:26
SawyerHood added a commit that referenced this pull request Aug 21, 2026
## What was wrong

The codebase carried a lot of code that nothing reached: symbols and
files with no consumer, options that no caller passes, branches the
types make impossible, feature flags that graduated but kept their `if`
guards, pass-through wrappers that only forward arguments, barrel files
that re-export hundreds of names nobody imports through them, and the
same small helper copied into many files. This code has no effect on
behavior, but every reader must still parse it.

## What changed

Net −16k lines across 1,732 files. No behavior change. Four commits, two
per pass:

1. **Remove dead code, pass-through wrappers, and stale barrels** —
unused symbols and files, dead branches, unused params/options,
single-use wrappers inlined, dead barrel lines, tests and stories that
existed only for deleted code. Drops the unused `cronstrue` dependency
from `apps/app`.
2. **Drop export from module-private symbols** — ~900 declarations that
were exported but only used inside their own file.
3. **Remove more dead code, duplicate helpers, and unused options** —
second pass over the same ground plus repo-wide sweeps for duplicate
helpers and legacy/compat paths. Folds byte-identical helper copies into
one shared module where the consumer already depends on it (e.g.
`describeError` ×11, `createDeferred` ×15 → `@bb/test-helpers`,
`DelayedLoading` ×4 → `@bb/shared-ui`). Removes unused
`ws`/`@types/ws`/`tsx` devDependencies from `apps/connect` and an unused
`@radix-ui/react-slot` from `apps/web`.
4. **Drop export from more module-private symbols** — ~700 more.

Out of scope on purpose: `@get-bb/plugin-sdk` and `@bb/sdk` exports
(public API), CLI commands and flags, server routes, DB schema and
migrations, generated code, wire payload shapes between the server and
host daemon (`HOST_DAEMON_PROTOCOL_VERSION` is unchanged), and parsers
for persisted or legacy data.

Every removal was found by one agent, adversarially verified by a second
agent that searched the whole repo (including strings, configs, docs,
`.ladle`, and stories) for any remaining reference, and then applied by
a third. 41 proposals were rejected at verification or apply time, and I
reverted 2 more by hand.

## How you verified

- `pnpm exec turbo run typecheck` — 74/74 packages pass
- `pnpm exec turbo run lint` — passes
- `pnpm exec turbo run build` for `@bb/app`, `@bb/server`,
`@bb/host-daemon`, `@bb/cli`, and all `plugins/*` — passes
- `pnpm exec turbo run test` — all packages pass except
`internal-skill-trees.test.ts`, which fails identically on `main` on
this machine (local umask 0002; passes in CI)
- Rebased onto `main` after #2125, #2132, #2128, #2126, #2112 landed;
re-ran typecheck, lint, and tests for the touched packages

Fixes #

> AGENT GENERATED: by Claude Opus 5

---------

Co-authored-by: Claude <[email protected]>
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