Skip to content

chat composer: a file over maxFileSize is refused with only a console.warn, so the user sees the file silently not attach #34463

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-project-manager · session_01FEkQ5obaLbqgzRUR9xXfft

Filing gate: ① reproducible defect, read from code (not measured in a browser), on main before PR #34459. Named by L1-b record 6928835635 on PR #34459.

Symptom

In the chat composer (used by the console AI chat), a picked, pasted or dropped file over maxFileSize (default 10 MiB) is refused with only a console.warn. The user sees nothing: the file just does not attach, with no reason given.

Location

The prompt-input composer in ui/packages/plugin-chatbot (the maxFileSize check on attach).

Acceptance

  1. A refused file shows the user a visible, translated message naming the file and the size limit.
  2. Pins: an over-size file shows the message and is not attached; CONTROL: a file under the limit attaches with no message.

Related

#32749, PR #34459 (Acceptance notes).

Dedupe: searched open issues on 2026-11-16 for composer maxFileSize console.warn (1 hit: #32749) and chat attachment too large silent (6 hits, all PM seat posts); none reports this.

Activity

  1. added
    bug
    domain:ui
    area:ai
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:ui · p3 (kept) · pm:queue · 2026-11-16T21:47Z

    ⛔ Not a claim.

    A file over maxFileSize is refused with only a console.warn, so the user sees the file silently fail to attach. It predates #34459. The user can retry with a smaller file, so p3 as filed. It is kept under the p3 standard because the user meets it.

  3. added
    pm:queue
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-warren · session_01JQwxbabAdcWyApSTGBYJNY

    Ruling-ref: maintainer 14:43Z 「立一张专题卡,开始执行」 and 15:56Z 「domain 和优先级 不是已经定了吗?为什么现在不能改卡」 · regrade v3 under epic #35205

    Grade: p2 (was p3) · area:ux · Bug · UX × not every user every time · 「chat composer: a file over maxFileSize is refused with only a console.warn, so the user sees the file silen…」; UX has no p3 (15:07Z 「和 cloud 对齐」)

  5. added
    priority:p2
    and removed on Nov 18, 2026
  6. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Claim: PM loop round 1 · area ux-2 (lease:ux-2; the maintainer, verbatim, 2026-11-19 project chat: 「接手 area:ux」「优先 p1 p2」) · 2026-11-19T00:12Z
    Session: session_01Utp6CZrgaiMgTJCnswR6jQ
    Account: os-bill
    Branch: claude/issue-34463-composer-oversize-notice
    Worktree: objectstack-issue-34463
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: ui/packages/plugin-chatbot/src/elements/prompt-input.tsx (the size check), ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx (the onError handler that only console.warns), the plugin's translation keys where the chatbot keeps them, their tests, root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — no path-derived mandate, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: ui plugin-chatbot in objectstack routes the composer's max_file_size refusal to console.warn only (ChatbotEnhanced.tsx:5760-5762); no platform path shows it; every console AI chat user who attaches a file over the limit (default 10 MiB)
    Thread-read: 6984710977
    Premise: holds — on origin/main cdb327fd: prompt-input.tsx:554-562 refuses with onError({code:"max_file_size"}) only when every file is over size (a mixed pick drops the big ones with no error at all); ChatbotEnhanced.tsx:5760 hands every onError to console.warn
    Serial constraints cleared: none — no open PR touches these files (live read of all 39 open PRs' files at claim time)
    Pre-claim lane: domain:ui (ui/packages/plugin-chatbot/**); the card's area:ai label is a reader tag, no other lane's path
    Pre-claim deps: none named; #32749 is related, not a blocker; overlap with open PRs: none
    Prior rulings read: chat,composer,file,maxfilesize,refused,console,warn,user,sees,silently,attach → 180 hits; none on point (ADR hits are term noise: ADR-0106 D6, ADR-0155 D1, ADR-0032 §1, ADR-0036 §1, ADR-0037 §2 §4, ADR-0038 §5); thread: none
    Note: Clause-②: no is the seat's reading; if the message's text lands as a new key in a published locale pack, the dev measures it and the seat amends this line.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ
    os-dev-report

    {
      "issue": 34463,
      "status": "done",
      "branch": "claude/issue-34463-composer-oversize-notice",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35272",
      "head": "a4b0e496cbbc3d2555846fbf8a9000822a41ce94",
      "session": "session_01Utp6CZrgaiMgTJCnswR6jQ",
      "premise_still_valid": true,
      "summary": "PromptInput.addLocal now reports every over-size file through onError (code max_file_size, new optional files field), the mixed pick included. Before, a mixed pick dropped its over-size files with no report at all. ChatbotEnhanced's onError, which only called console.warn, now shows a role=alert notice above the composer naming each refused file and the limit (Intl unit spelling in the user's locale). The notice uses the band SendErrorNotice already used, now factored into a shared ComposerNotice; it closes with its close button or on the next send. The new pack key chatbot.composer.fileTooLarge is in all 11 locale files under ui/packages/i18n/src/locales/, and the close button reuses common.close.",
      "A1": "HOLDS at cdb327fd: prompt-input.tsx addLocal called onError max_file_size only when accepted.length > 0 and sized.length === 0. A mixed pick attached the in-limit files and dropped the over-size ones with no onError. Ablation re-introducing that guard turns the new mixed-pick pin red (1 failed, 4 passed).",
      "A2": "HOLDS at cdb327fd: ChatbotEnhanced passed onError an inline arrow that only called console.warn('[plugin-chatbot] prompt-input error', e). Ablation disabling the new branch turns 4 of the 5 new pins red; CONTROL stays green.",
      "A3": "accept: SAME SILENCE, other lines. It fires only when every incoming file fails matchesAccept, and a mixed pick drops the failing files silently. Those are separate lines of addLocal, so they are not fixed here (named in Acceptance notes). Underneath sits a larger defect, filed as finding (a) below: extension tokens in accept never match File.type, so with ChatbotEnhanced's default acceptedFileTypes a picked .csv or .pdf is refused with code accept and only console.warn (probe: warns [accept,accept], csv=false pdf=false png=true). max_files: ChatbotEnhanced passes no maxFiles, so it never fires in this composer; the producer does report a partial overflow. Both codes still reach only console.warn in the consumer handler, unchanged.",
      "tests": "New top-level describe in ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.sendError.test.tsx, with 5 cases: over-size alone, mixed pick, CONTROL under-limit, close button, zh pack. `pnpm --dir ui exec vitest run packages/plugin-chatbot/ packages/i18n/ --maxWorkers=2` exit 0: Test Files 207 passed (207), Tests 3006 passed, 13 skipped (3019). `pnpm --dir ui exec vitest run scripts/ --maxWorkers=2` exit 0: Test Files 171 passed, 2 skipped (173). `pnpm --filter @object-ui/plugin-chatbot type-check` exit 0 and `pnpm --filter @object-ui/i18n type-check` exit 0; both include src/**/*.test.tsx through tsconfig.test.json. All at head a4b0e496. Ablations ran through scripts/ablation-replace.mjs under the lock; the test imports ../ChatbotEnhanced from source, so no dist leg was needed. Producer guard leg: anchor 1 to 0, 1 failed, 4 passed, restored blob == HEAD 5d03375a8c39 with git diff HEAD empty. Consumer branch leg: anchor 1 to 0, 4 failed, 1 passed (CONTROL), restored blob == HEAD de5e3f172a98.",
      "gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` named 41 commands at a4b0e496, and all 41 exited 0 (each captured before any pipe). --ran reconciliation: 41 derived famil(ies) accounted for, 41 run, 0 NOT-MEASURED (a DERIVED zero: all 41 recorded an exit code and none is 3). node scripts/check-nul-bytes.mjs exit 0. Pre-push check:commit-card-trailers is green on both pushes. CI families (Lint UI, Type Check UI, Test UI, Build and E2E UI, Lint and Repo Gates, type-check lanes): in_progress at report time. Not waited on, per contract.",
      "line_budget": "n/a: no skills/** or ledgered file in the diff. Diff is +206 / -8 over 15 files (under the 3000-line human-merge threshold).",
      "files_changed": [
        ".changeset/34463-composer-oversize-notice.md",
        "ui/packages/plugin-chatbot/src/elements/prompt-input.tsx",
        "ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx",
        "ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.sendError.test.tsx",
        "ui/packages/i18n/src/locales/{ar,de,en,es,fr,ja,ko,pt-BR,ru,zh-Hans,zh-Hant}.ts"
      ],
      "deviations": [
        "Published locale pack, measured on the built dist (closure build at the branch): chatbot.composer.fileTooLarge lands in all 11 ui/packages/i18n/dist/locales/*.d.ts. @object-ui/i18n publishes these through its ./locales export: readonly literal in en, zh-Hans and zh-Hant, string in the other 8. Also, PromptInputProps onError gains the optional files field; it is exported as AIElements from @object-ui/plugin-chatbot. Both are additive widenings. The PR body and changeset carry the claim's Clause-②: no verbatim, and the seat amends it.",
        "Commit trailer: the dispatch prompt asked for a model-named Co-Authored-By trailer. The pre-push check:commit-card-trailers refused it, and AGENTS.md and os-dev.md require the model-free pair, so the unpublished first commit was amended to `Co-authored-by: Claude` and both commits carry that pair. No history was rewritten on the remote.",
        "PR body: lines 1 and 2 are the attribution comment and the Requested-by line the dispatch prompt ordered. Fixes #34463 is line 3, under os-dev's exception for harness attribution.",
        "Pin placement: the new pins are a top-level describe in the existing composer-notice file ChatbotEnhanced.sendError.test.tsx, per ruling 6583487846 on shared harness files. No new test file.",
        "Translation keys live in ui/packages/i18n/src/locales/*.ts, inside the fence ('the chatbot's translation keys where it keeps them').",
        "Lock: two queue-timeouts (exit 99, NOT MEASURED at the time) behind holder pid 2052, the sibling #34182's vitest run of packages/fields and packages/plugin-detail. Both were recovered by re-taking the stable slot. The dependency closure build (turbo, 49 tasks, 0 cached) took 6m01s under the lock on a shared box.",
        "Not measured in a live browser. The behaviour is pinned in jsdom at the component level."
      ],
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm.",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes (fleet-write repository_dispatch, as objectstack-fleet[bot]): (1) pr_create = POST /repos/objectstack-ai/objectstack/pulls (draft, #35272) + POST /repos/objectstack-ai/objectstack/issues/35272/assignees [os-bill], read-back 7514 bytes sent = stored; (2) this os-dev-report = POST /repos/objectstack-ai/objectstack/issues/34463/comments. Plus git push of the branch (not REST).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: console AI chat composer file picker (ChatbotEnhanced with enableFileUpload and the default acceptedFileTypes 'image/*,.pdf,.doc,.docx,.txt,.csv,.tsv,.xlsx,.xlsm', which AiChatPage passes) — a picked claims.csv (text/csv) and r.pdf (application/pdf) do not attach and onError fires with code accept, which reaches only console.warn; ok.png attaches (jsdom probe render at a4b0e496, not a live browser) · evidence: prompt-input.tsx matchesAccept compares each non-wildcard accept token with File.type exactly, so extension tokens (.pdf, .csv, .xlsx …) can never match a MIME type; addLocal also drops a type-failing file from a mixed pick with no onError · dedupe words: composer accept extension token, matchesAccept mime, chat attachment csv pdf not attached, acceptedFileTypes extension",
        "carrier: none · noted, not filed: PromptInputProvider add() applies neither accept nor maxFileSize (dormant: ChatbotEnhanced mounts no provider)"
      ]
    }
  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Claim: amended by the seat after the dev's measurement (os-dev-report 6996617564, deviation 1) · 2026-11-19T01:16Z
    Session: session_01Utp6CZrgaiMgTJCnswR6jQ
    Account: os-bill
    Branch: claude/issue-34463-composer-oversize-notice
    Clause-②: yes (widening)
    Metadata-protocol: none

    Why: the claim's no was the seat's reading, left to the build to settle (claim 6995512917). Measured on the built declaration closure: the new key chatbot.composer.fileTooLarge lands in all 11 published @object-ui/i18n locale packs (./locales export), and PromptInputProps.onError gains an optional files field on the exported AIElements of @object-ui/plugin-chatbot. Both add to the published surface, nothing narrows. Precedent: PR #35122 declared yes for new locale keys. A ## Contract review record is owed before the queue (L1 thread). PR: #35272.

  10. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

    Closed-out · area ux-2 · 2026-11-19T02:08Z

    reading value
    PR #35272 MERGED through the merge queue as c3fb37a4c2 (Fixes #34463; this card closed completed)
    contract record ## Contract review 6997046269 (TIER_DEFAULT, PASS, nits only); L1-a ACCEPT 6997063136; claim amended to Clause-②: yes (widening)

    Delivered: a file over the composer's size limit is named with the limit in a translated notice above the composer (11 locales), in both the all-over and the mixed pick; the small files of a mixed pick still attach.
    Follow-up: #35276 (extension accept tokens never match File.type, so .pdf/.csv cannot attach; same file, area ux-2, next free slot).
    State: pm:dispatched removed; card closed.

  11. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aiarea:uxbugdomain:uipriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions