Skip to content

feat(showcase): per-line Receipt attachment on invoice lines (upload-in-grid demo)#3051

Merged
os-zhuang merged 1 commit into
mainfrom
claude/field-file-inline-grid-bug-o5bmrr
Jul 16, 2026
Merged

feat(showcase): per-line Receipt attachment on invoice lines (upload-in-grid demo)#3051
os-zhuang merged 1 commit into
mainfrom
claude/field-file-inline-grid-bug-o5bmrr

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Companion to objectstack-ai/objectui#2585 (fixes objectstack-ai/objectui#2360).

Adds receipt: Field.file({ label: 'Receipt' }) to showcase_invoice_line, so the showcase's canonical master-detail inline grid (inlineEdit: 'grid') demonstrates and continuously exercises file upload in a line-item grid — the "attach the receipt to each expense line" pattern the issue came from.

Dogfood verification (browser, this example)

Booted this example fresh (objectstack dev --seed-admin --fresh -p 4010) with the objectui console dev server (VITE_SERVER_URL/DEV_PROXY_TARGET → :4010) and drove it with Playwright as admin:

  1. New Invoice form auto-derives a Receipt column into the Line Items grid (no explicit columns config).
  2. The cell renders a real input[type=file] + compact upload button — no text-input degradation.
  3. Picking a file uploads through the console's createObjectStackUploadAdapter and shows a removable chip.
  4. Save goes through /api/v1/batch; the line persists receipt with a canonical /api/v1/storage/files/<fileId> URL (verified via the data API, and the URL round-trips the uploaded bytes).
  5. Reopening the invoice's edit form renders the stored receipt as a chip.

pnpm validate passes for the example.

🤖 Generated with Claude Code

https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC


Generated by Claude Code

…in-grid demo)

Adds a `receipt: Field.file()` to showcase_invoice_line so the showcase
exercises objectui#2360 end-to-end: the inline line-item grid auto-derives
an upload column and renders a compact picker per row (the "attach the
receipt to each expense line" pattern). Verified in-browser against this
example: upload → save via /api/v1/batch → value persists with a canonical
/api/v1/storage/files/<id> URL → reopening the form renders the stored chip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 16, 2026 11:59am

Request Review

@os-zhuang
os-zhuang marked this pull request as ready for review July 16, 2026 12:29
@os-zhuang
os-zhuang merged commit 73da36a into main Jul 16, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the claude/field-file-inline-grid-bug-o5bmrr branch July 16, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fields] Field.file 在 inline grid 退化为文本框、无法上传,且被自动子表列排除

2 participants