fix(ui): show the name of the uploaded file - #40
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, localized to a single component usage, and aligns with the stated issue/behavior without altering file-handling logic.
Pull request overview
This PR updates the home page’s file-upload UI so that selecting a file clearly shows the chosen file (name/size) and keeps the dropzone height stable, addressing Issue #39.
Changes:
- Switches
UFileUploadtolayout="list"so the selected file’s name/size card is rendered instead of hidden by the defaultgridtheme behavior. - Sets
position="inside"so the file card replaces the upload icon within the dropzone rather than appearing beneath it (avoids layout jump). - Adds an inline comment documenting why these props are set.
File summaries
| File | Description |
|---|---|
| apps/app/app/pages/index.vue | Adjusts UFileUpload props to display selected file details and keep the upload area layout stable. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Closes #39
Two props on the
UFileUploadinpages/index.vue:layout="list", so the file name and size are rendered instead of hidden, andposition="inside", so the card appears in the dropzone rather than under it.Why
Picking a file left the control unchanged, so nothing said which file was about to be encrypted — and since the name is encrypted along with the content, a wrong pick is only discovered by the recipient, after a read has been spent. Issue #39 has the longer version.
Two things about the shape of the fix:
Nothing is built.
UFileUploadalready renders an icon, the name, a formatted size and a delete button. The Nuxt UI theme hides that block in the defaultgridlayout (fileWrapper: "hidden") and hands the tile to a full-frame image preview, which is the right default for an avatar picker and the wrong one here.listis the layout the component ships for exactly this.position="inside"is not only cosmetic. The default puts the card below the dropzone, which adds its height to themin-h-40and makes the form jump at the moment of selection. Inside, the component swaps the upload icon for the card within the same box, so the height is stable. The dropzone stays clickable to replace the file, and the delete button keeps its@click.stop.prevent, so neither gesture triggers the other.No behaviour around the file itself changes: the same
Filereachessubmit(), and it is stillselectedFile.namethat gets encrypted intofileNameEnc.Checks
pnpm lint,pnpm typecheckandpnpm testpasspnpm db:generate) — no schema changeNone of the three. No server code changes, no i18n key is added or removed, and the diff is two props and a comment on one component.
Worth knowing when reviewing: nothing in the suite covers this. The tests are unit tests over pure logic and none of them mounts a page, so this was verified by reading the resolved theme (
.nuxt/ui/file-upload.ts) rather than by a test. It is worth a look in the browser with a long file name, where the theme relies ontruncate.AI assistance
See CONTRIBUTING.md. Disclosure is not held against you: it tells
the reviewer where to look hardest.