Skip to content

Fix long filenames in Add Project dialog - #1145

Merged
ymichael merged 3 commits into
mainfrom
bb/fix-long-filenames-in-add-thr_96rrffkwt9
Aug 7, 2026
Merged

ymichael merged 3 commits into
mainfrom
bb/fix-long-filenames-in-add-thr_96rrffkwt9

Conversation

@ymichael

@ymichael ymichael commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • constrain shared dialog grid tracks so long intrinsic content cannot widen desktop dialogs or mobile drawers
  • truncate long folder, file, and derived project names while preserving full entry names as hover titles
  • add regression coverage and a long-names row to the Project Path story

Testing

  • pnpm exec turbo run test --filter=@bb/app --force -- src/components/dialogs/ProjectPathDialog.test.tsx src/components/dialogs/RemotePathBrowser.createFolder.test.tsx
  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui
  • pnpm exec turbo run lint --filter=@bb/app
  • pnpm exec turbo run build --filter=@bb/app

Closes #1112

@SawyerHood

SawyerHood commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

🚨 SLOP COP 🚨 · review

ELI5: This change helps the Add Project dialog show long folder names without breaking its layout.

I’m SlopCop. I’m reviewing this pull request for security, code quality, architecture, performance, and end-to-end behavior.

<span className="font-medium text-foreground">
<p className="flex min-w-0 gap-1 text-sm text-muted-foreground">
<span className="shrink-0">Project name:</span>
<span className="min-w-0 truncate font-medium text-foreground">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 slopcop/review — The clipped project name has no full-value fallback.

This span now truncates the generated name. Add title={derivedProjectName} to match the file and folder labels above.

This change lets desktop users read the full value before they submit the form.

@SawyerHood SawyerHood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

ELI5: The dialog now keeps very long names inside its box. One clipped project name still needs a full-value tooltip.

I found one small user experience issue. The project-name preview clips correctly, but users cannot reveal its full value. See the inline comment.

The security review found no issue. The change does not alter path handling, permissions, contracts, or host communication.

The performance review found no issue. The fixed grid track avoids content-based growth without new scripts, observers, or render work.

The codebase scan found one related duplicate. AlertDialogContent has a similar grid shell without the fixed track.

That duplicate does not block this focused fix. A later shared surface class could keep both dialog shells consistent.

Validation completed at the reviewed SHA:

  • Turbo ran 320 app test files and 2,390 tests. All tests passed.
  • Turbo type-checked @bb/app and @bb/shared-ui. Both checks passed.
  • Ladle rendered the long-name story in Chromium.
  • Browser measurements showed no page overflow. The long labels remained inside the 512-pixel dialog.

The pull request added commit 3458d63 during this review. That commit only regenerated the plugin dialog registry and kept the reviewed source unchanged.

@ymichael
ymichael merged commit 5b5b9ed into main Aug 7, 2026
10 checks passed
@ymichael
ymichael deleted the bb/fix-long-filenames-in-add-thr_96rrffkwt9 branch August 7, 2026 17:09
amadad pushed a commit to amadad/bb that referenced this pull request Aug 14, 2026
## Summary

- constrain shared dialog grid tracks so long intrinsic content cannot
widen desktop dialogs or mobile drawers
- truncate long folder, file, and derived project names while preserving
full entry names as hover titles
- add regression coverage and a long-names row to the Project Path story

## Testing

- pnpm exec turbo run test --filter=@bb/app --force --
src/components/dialogs/ProjectPathDialog.test.tsx
src/components/dialogs/RemotePathBrowser.createFolder.test.tsx
- pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui
- pnpm exec turbo run lint --filter=@bb/app
- pnpm exec turbo run build --filter=@bb/app

Closes get-bb#1112
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.

Long file names break the "Add project" modal

2 participants