Skip to content

chore: Enhance attachment ui - #802

Open
harshil-2096 wants to merge 2 commits into
mainfrom
fix/hv/during-file-upload-we-only-see-the-file-icon-and-have-to
Open

harshil-2096 wants to merge 2 commits into
mainfrom
fix/hv/during-file-upload-we-only-see-the-file-icon-and-have-to

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

image

Closes #

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
Presentation-only changes to attachment chips and layout; no changes to upload, storage, or auth flows.

Overview
Composer and sent-message non-image attachments now render as horizontal chips with extension-based icons, a visible truncated filename, and formatted size (KB/MB) instead of a small square thumbnail with only a tooltip.

AttachmentCard gains optional sizeBytes, getAttachmentFileIconName (pdf/doc/csv/json/etc.), and keeps the compact image thumbnail when a preview URL exists. AttachmentsContainer derives byte size from the staged File or from base64 data URIs on sent attachments. Layout tweaks: composer attachment row scrolls horizontally when many files are staged; sent attachment rows can wrap.

New Lucide-backed icon keys (file-text, file-spreadsheet, file-code) are registered for the chip UI. Tests cover icon mapping, metadata display, and container behavior.

Reviewed by Cursor Bugbot for commit 27bfe95. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 27bfe95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f66e7ed. Configure here.

Comment thread packages/trueforge-ui/src/containers/AttachmentsContainer.tsx
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