Skip to content

fix(admin-ui): show an uploading state while any upload collection saves a file - #892

Merged
sydevs-bot merged 9 commits into
mainfrom
claude/fix-888-upload-notice
Oct 9, 2026
Merged

sydevs-bot merged 9 commits into
mainfrom
claude/fix-888-upload-notice

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A Spinner now shows from submit until the response whenever a save posts a file, on all 8 upload collections.
  • Mounted by storagePlugin, in an additive slot — a new upload collection gets it with no wiring, and none can opt out.

Change outline

Flow — where the notice mounts, and what Payload gives it

 Edit view                                    @payloadcms/ui/views/Edit
   <Form>                                     # holds `processing`, publishes via ProcessingContext
     BeforeFields → <Upload>                  # or edit.Upload, which REPLACES this
     <DocumentControls>
+      BeforeDocumentControls                  # edit.beforeDocumentControls, CustomComponent[]
+        UploadNotice                          # unconditional, inside <Form>
+          useFormProcessing() ∧ fields.file.value instanceof File
+            → <Spinner loadingText={t('general:uploading')} />
       SaveDraftButton / PublishButton

Both halves of the predicate are load-bearing. processing is equally true of a save posting no file; data-form-ready is also false while the form initializes. The staged File sits at form state's file path, where Payload's own <Upload> writes it through useField({ path: 'file' }).

Behaviour — where the transform runs, and why that line

 storagePlugin(options)                       src/plugins/storage/
   (incomingConfig) =>
+    withUploadNotice(withObjectKeyColumn(incomingConfig))
       for each collection
         no `upload` → return the same object  # untouched, no spread
         append UPLOAD_NOTICE to edit.beforeDocumentControls
     !enabled                          → return  # E2E
     any Cloudflare credential missing → return  # local dev, test suite, migrate:create
     cloudStoragePlugin({ … })(config)

One plugin, not two. ⚠ The transform is applied above both early returns, which is the whole of why the fold is safe: a save still posts a file when the plugin is disabled and when the credentials are absent, and a notice folded in below either return would mount in none of those environments. It stays keyed on collection.upload rather than STORAGE_BACKENDS, so a new upload collection is covered before anyone picks its backend.

beforeDocumentControls is an additive array slot, so no collection is skipped and none loses what it declared. AudioUpload keeps its own edit.Upload and gets the notice.

Files

 src/plugins/storage/
+├── uploadNotice.ts          # appends the notice to every upload collection
 └── storagePlugin.ts         # +2 lines: applies it above both early returns
 src/components/admin/UploadNotice/
+├── UploadNotice.tsx         # the Spinner + the two-signal predicate
+└── index.ts                 # default export, for the import map
 src/components/admin/AudioUpload/
 └── AudioUpload.tsx          # +1 line: forward `initialState` (pre-existing bug, below)

Preview

  • Images editor — a native upload collection; attach a large file and save
  • Meditations editor — the custom AudioUpload slot, which keeps its player and drift banner
  • Songs list — "Bulk Upload" here exercises the initialState fix

Test results

  • Lean gate: ✓ pnpm lint, pnpm typecheck, pnpm typecheck:tests, pnpm test:unit (2293 passed)
  • Targeted specs: tests/int/collections-smoke.int.spec.ts 19 passed — the config canary, since the notice changes every upload collection's sanitized config
  • New: tests/unit/upload-notice.spec.ts (4), tests/unit/upload-notice-coverage.spec.ts (6), tests/unit/upload-notice-storage.spec.ts (3)
  • pnpm generate:importmap reports no new imports, which is what proves the component is still registered after the fold
  • Build: N/A — Railway builds the preview

Every new assertion was watched failing first: each half of the predicate removed in turn, the slot's existing contents replaced instead of appended, the label hardcoded in English, the notice applied below one of storagePlugin's early returns, and the notice keyed off STORAGE_BACKENDS instead of collection.upload.

Manual verification

Automated specs cover the predicate and the wiring. What they cannot reach is a real browser doing a real multipart POST:

  1. Images or Files — create a document, attach a large file, throttle the network, hit Save. The spinner and message should appear beside the Save button and clear when the response lands.
  2. Meditations or Songs — same, through AudioUpload. Confirm the audio player and the frame-drift banner still render.
  3. A save with no file — edit a title only. No notice should appear.
  4. A failed upload — the notice clears and the existing error toast still shows.
  5. Songs → Bulk Upload — each staged file should show its thumbnail, filename and remove button. On main this pane is empty (see below).

The Images and Videos storage adapters have not been checked against this behaviour, per the ticket.

Notes for reviewer

The notice now lives in storagePlugin, per review. The separate plugin's only reason to exist was that storagePlugin returns early when disabled and again when any Cloudflare credential is missing. Applying the transform above both returns removes that reason and keeps the coverage identical — the credentials now decide where a file goes, never whether the save says anything. Two specs hold that line, both watched failing: upload-notice-storage.spec.ts drives the plugin through all three paths, and the backend-map keying regression fails upload-notice-coverage.spec.ts as well.

The ticket's preferred approach does not work, and nor does its fallback's slot. It asked me to try <Upload>'s UploadControls slot first. That slot renders inside the dropzone, which the staged-file preview replaces the moment a file is chosen — so it is empty exactly when the notice is needed. The ticket's fallback was to wrap <Upload> via edit.Upload; I built that, then moved off it. edit.Upload replaces Payload's upload box, which forces a skip branch for AudioUpload (so every future custom-Upload collection would opt out silently, and AudioUpload returning null during live preview would take the notice with it) and forces a 50-line re-implementation of Payload's own call site. beforeDocumentControls is additive and costs none of it. The history has both, so the diff is reviewable either way.

The one thing edit.Upload covered and this does not is the Bulk Upload drawer — and that coverage was inert. FormsManager.saveAllDocs builds each request itself and fetches in a loop, never calling the nested form's submit, so useFormProcessing() stays false there and the notice could never have fired. The drawer already renders its own LoadingOverlay with a general:uploadingBulk progress count, which is better than ours. Worth a sanity check — it is the one claim that reversed the design.

An incidental pre-existing bug is fixed here: AudioUpload never forwarded initialState, so the Songs bulk-upload drawer renders an empty box today. One line, and it is the same root cause this PR documents — a replacement Upload component receives no props, so everything Payload passes at its own call sites must be re-sourced. Meditations is unaffected (bulkUpload: false).

Known limitation, recorded not worked around: UploadControls and customActions reach the Edit view and the bulk drawer as props and sit on no context, so a collection with its own edit.Upload component cannot re-source them. No collection here configures either.

The label is Payload's general:uploading, not our own sentence. It is the key the bulk drawer's own overlay uses, so every locale the admin ships already carries it — Czech reads "Nahrávání", and #888 was reported from a Czech panel. The cost is the "please keep this page open" half of the ticket's proposed wording: carrying that needs a custom translation catalogue, which this repo has no precedent for. Say so if you want one.

Dismissed finding: a reviewer flagged that AudioUpload shows no notice while live preview is open. It returns null there wholesale, so there is no upload control to start a save from in that state — and the additive slot makes the question moot, since the notice is now a sibling of the Save button rather than a child of AudioUpload.

Detail

Why render it ourselves. Payload publishes the state and leaves the rendering to the app: Form holds processing and exposes it through ProcessingContext and data-form-ready, while <Upload> reads the same hook only to reset its removedFile state. None of the 33 upload options covers progress. Discussion payloadcms/payload#1180 asked for this and was closed as roadmap: complete by PR #1923, which covered lists, document load and lazy editors — never the multipart save.

Built-in primitive used, per the "Prefer Payload's built-in components" rule: Spinner from @payloadcms/ui (spinner icon plus loadingText, themed, inline flex). Nothing was missing, so no custom-styled component was written. docs/rules/admin-ui.md's Loading row now names it.

The fold moved the notice earlier in the plugins array, from second-to-last to fourth. That costs nothing today: no plugin registered after storagePlugin creates an upload collection — checked across this repo's own plugins and the three @payloadcms ones in the list, where form-builder's upload is a field-block option rather than a collection. A future plugin that creates one would need the notice applied after it, which is the one thing the old position bought.

Fixture pre-mortem. The coverage spec asserts over the real @/collections array rather than a fixture, because a fixture would assume the very thing under test — which collections declare upload. Verified against src/collections/index.ts and the eight upload: blocks (Files, Frames, Images, Meditations, SongTags, Songs, UserChoices, Videos). The synthetic collections in that spec cover only what the real array cannot show: a brand-new upload collection, and one already using the slot. The storage spec adds a podcasts collection that is deliberately not a STORAGE_BACKENDS slug.

Registration is now asserted by behaviour, not by text. The old spec sliced payload.config.ts for the plugin's name, because the alternative was buildConfig, which boots Payload. upload-notice-storage.spec.ts needs neither: it calls storagePlugin directly with @/lib/env mocked — the shape storage-object-key.spec.ts already uses — so the assertions read the config the plugin actually returns. The generated importMap.js entry is still asserted beside it, since that entry exists only because generate:importmap resolved the component on the sanitized config.

A vacuous-assertion trap, caught and fixed. The first version of the registration assertions searched the whole file and compared raw indexOf results, so deleting the registration left them green twice over — the import satisfied toContain, and -1 < n satisfied the ordering. Those assertions are gone with the text slicing, but the lesson is why the replacement asserts the returned config rather than a source file.

A measurement correction. An earlier draft of that spec's docblock claimed importing @/collections "costs nothing". Measured: ~3.4s of import and transform against a 0.16s baseline. The marginal lane cost is nil (23 unit specs already pay for the graph, and adding this file moved a two-file run by 0.01s), so the conclusion stands, but the comment no longer reads as licence to add the import where it is not amortized.

No migration. The notice touches admin.components only — no schema, no fields, no DB change.

Rejected alternatives. A ui field would also cover both views and has repo precedent (src/fields/previewTargetField.ts), but it joins the list-view column selector unless the plugin also sets admin.disableListColumn, needs a name unique against each collection's fields, and lands wherever it is spliced in field order. beforeDocumentControls is one line with none of that. beforeFields is not an option at all: the Edit view reads it off useDocumentInfo() and falls back to the upload box itself, so supplying it would replace <Upload>.

Closes #888

🤖 Generated with Claude Code

https://claude.ai/code/session_01KQVFrCyfkChD53QyPK3dsJ

claude added 4 commits October 6, 2026 20:30
…ves a file

Saving a document with a file attached gave no feedback between submit and the
response: the button faded and nothing else changed, so a large file on a slow
connection read as a frozen page. An admin reported being unable to get past
the meditation upload screen, and that silent wait was the whole cause.

Payload publishes the state and renders nothing for it. `Form` holds
`processing` and exposes it through `useFormProcessing()`; `<Upload>` reads the
same hook only to reset its remove-file state, and none of the 33 `upload`
options covers progress. So the notice is ours to render.

`UploadNotice` shows a `Spinner` while `useFormProcessing()` is true AND form
state's `file` path holds a `File`. Neither half alone is the signal:
processing is equally true of a save posting no file, and `data-form-ready` is
also false while the form initializes.

`uploadNoticePlugin` wires it for every collection with `upload` set, because
per-collection wiring is the step someone forgets — the coverage criterion is
what the ticket actually asks for. A collection naming its own Upload
component is skipped and composes the notice itself; overriding `AudioUpload`
would have cost the audio player and the frame-drift banner.

`<Upload>`'s own `UploadControls` slot cannot carry this. It renders inside the
dropzone, and the dropzone gives way to the staged-file preview the moment a
file is chosen — so the slot is empty exactly when the notice is needed.

Both specs were watched failing before they were kept. The registration
assertions needed a second pass: searching the whole file let the import stand
in for the registration, and comparing raw `indexOf` results let `-1` pass the
ordering check, so deleting the registration left them green twice over.

Refs #888

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KQVFrCyfkChD53QyPK3dsJ
…hows an empty box

Payload hands a replacement Upload component no props at all — it reads the
node off `useDocumentInfo().Upload` and renders it bare — so everything its own
two call sites pass has to be re-sourced. `initialState` was missing from both
this PR's new component and the existing `AudioUpload`.

It is optional, so omitting it compiles and looks correct on the edit view.
`<Upload>` sets `fileSrc` from it on mount and gates the whole staged-file
block — thumbnail, filename input, remove button, crop — on `value &&
fileSrc`. A click sets `fileSrc` itself, so only a form arriving with a `File`
already staged needs it: the Bulk Upload drawer, which renders one pre-staged
form per file. Without it that drawer showed an empty box.

That was already true for Songs through `AudioUpload`, and this PR's plugin
would have extended it to the six collections it newly wires. One cause, one
fix, both call sites.

`UploadControls` and `customActions` reach those call sites as props and sit on
no context, so they cannot be re-sourced. Recorded as a limitation rather than
worked around — no collection here configures either.

The forwarding is spec'd, because nothing else can see it: the prop is
optional, the staged-file block belongs to `@payloadcms/ui`, and no pure test
reaches the wiring. Watched failing with the prop removed.

Refs #888

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KQVFrCyfkChD53QyPK3dsJ
…oad slot

The notice was wired as `admin.components.edit.Upload`, which *replaces*
Payload's upload box. Every awkward part of the first two commits came from
that one choice, and `edit.beforeDocumentControls` removes all of it: a
`CustomComponent[]`, rendered unconditionally as the first child of the
controls row, inside the `<Form>` the notice reads.

Because it is an array the plugin appends, so nothing can collide. That drops
the skip branch for collections with their own Upload component — which also
meant every future custom-Upload collection opted out of this fix silently,
and that `AudioUpload` returning null during live preview took the notice with
it. It also drops `UploadWithNotice` and its spec, 161 lines whose only job was
re-implementing Payload's own call site faithfully: a replacement component
receives no props, so `initialState` had to be re-sourced, and `UploadControls`
and `customActions` could not be re-sourced at all.

The one thing the Upload slot covered and this does not is the Bulk Upload
drawer, and that coverage was inert. `FormsManager.saveAllDocs` builds each
request itself and `fetch`es in a loop, never calling the nested form's submit,
so `useFormProcessing()` stays false there and the notice could never have
fired. The drawer already renders its own `LoadingOverlay` with a
`general:uploadingBulk` progress count, which is better than ours.

`AudioUpload` keeps one line from the reverted work: forwarding `initialState`.
That bug is older than this branch and independent of the notice — without it
the Songs bulk drawer renders an empty box, since `<Upload>` sets `fileSrc`
from `initialState` and gates the staged-file block on it.

Also folded in: the coverage spec now reuses `SRC`/`sourceOf` from
`tests/utils/importGraph` instead of a second cwd-dependent definition, both
specs import the component directly rather than copying a dynamic-import dance
that only its precedent's module state needed, and the story lives in
`docs/rules/admin-ui.md` once instead of four times.

The new assertions were watched failing: skipping a collection, and replacing
the slot's existing contents instead of appending.

Refs #888

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KQVFrCyfkChD53QyPK3dsJ
…d it

Payload renders no feedback for a multipart save, so the notice is ours. The
part worth writing down is which slot to mount such a thing in: an additive
`CustomComponent[]` rather than a replacement, and the three costs of the
replacement slot — a skip branch, a component that must re-source every prop
Payload passes at its own call sites (and cannot re-source two of them), and
bulk-drawer coverage that never fires because `saveAllDocs` bypasses the form.

Each is invisible from the call site and each cost this branch a revision.

Refs #888

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KQVFrCyfkChD53QyPK3dsJ
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-892 October 6, 2026 21:01 Destroyed
@railway-app

railway-app Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-892 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Oct 9, 2026 at 4:56 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 6, 2026
@sydevs-bot

sydevs-bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 16:42Z address-review · attempt 1 · session · done
  • 16:42Z address-review · attempt 1 · session
  • 23:32Z address-review · attempt 1 · session · done
  • 23:32Z address-review · attempt 1 · session
  • 21:19Z address-review · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🧐 Adversarial review

Holistic. The code half is as small as the problem: 33 source lines cover all 8 upload collections, with no schema and no contract surface. The additive-slot choice is right, and I verified both Payload claims it rests on. The prose half is not: 58 comment and doc lines for those 33, and the rejected edit.Upload design is explained four times over. Nothing else in the diff exceeds the ticket.

Findings

  • should-fix — docs/rules/admin-ui.md:44: the rules doc post-mortems an approach the codebase does not contain. Three other files repeat it.
  • consider — UploadNotice.tsx:22: the notice is the only untranslated string on a row of translated controls.

What was checked

Ticket #888 and its five acceptance criteria, the diff whole, plus these reads in Payload 3.90.2:

  • DocumentControls/index.js:222 renders the slot first inside __controls and calls useFormProcessing() itself. The notice is inside <Form>, as claimed.
  • Upload/index.js:177 writes the staged File to form state file. The predicate holds.
  • FormsManager/index.js:296 builds FormData and fetches in a loop, never submitting the nested form. The claim that reversed the design is true, and :314 confirms the drawer's own translated overlay.
  • Upload/index.js:300,448 gate the staged-file block on value && fileSrc, set from initialState. The AudioUpload fix is real.
  • No pasteURL in src/, so no server-fetch save slips the predicate.
  • NextStepButton calls useForm().submit(), so the notice fires on the reported Meditations path.
  • Folding this into storagePlugin would lose the no-wiring criterion. It keys off a hardcoded slug map, not collection.upload.
  • accessPlugin creates no collection, so registering before it costs nothing.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread docs/rules/admin-ui.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 6, 2026
claude added 2 commits October 6, 2026 21:23
The rule file loads on every `src/components/admin/**/*.tsx` read, so it
pays for its length on every one. The skip-branch and inert-advantage
bullets record a design this codebase does not contain, and the PR body
already holds that record.

The `initialState` trap stays: it is the one fact a future
replacement-Upload author needs, and nothing but prose carries it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011y14iwdbWnNNbp3AwArBwJ
The notice sat in a row of translated controls as the one English
string, and #888 was reported from a Czech panel. `general:uploading` is
the key Payload's own bulk-upload overlay uses, so every locale the
admin ships already carries it ("Nahrávání" in Czech).

The cost is the "please keep this page open" half of the sentence:
carrying that would need a custom translation catalogue, which this repo
has no precedent for. The spinner still says a wait is in progress.

The spec's stubbed `t` answers a Czech string, so a hardcoded English
label fails the assertion instead of passing it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011y14iwdbWnNNbp3AwArBwJ
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-892 October 6, 2026 21:26 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Both adversarial-review threads adopted. Pushed 1f1c81c.

Dropped with that sentence: "please keep this page open". A custom translation catalogue is the only way back, and this repo has no precedent for one. Say so and I will add it.

Lean gate green — lint, typecheck, typecheck:tests, 2288 unit. No integration re-run: neither commit touches the sanitized config. The label assertion was watched failing against a hardcoded English string.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 6, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 6, 2026 21:38
@sydevs-bot
sydevs-bot requested a review from Ardnived October 6, 2026 21:38
@sydevs-bot
sydevs-bot enabled auto-merge October 6, 2026 21:38
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 7, 2026
The seven-line JSDoc paragraph re-derived a mechanism docs/rules/admin-ui.md
already owns in full, naming AudioUpload as it does. What a reader of this
file needs is the constraint and its silent failure, so that is what stays,
with the rule as the breadcrumb.

The ⚠ marker stays per docs/rules/code-comments.md.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CgfQaLhixYAnwH3yk8W1u
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-892 October 7, 2026 23:38 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Both review threads answered. Pushed 474c1e9.

  • Adopted — the initialState JSDoc in AudioUpload is now two lines: the constraint and its silent failure, pointing at docs/rules/admin-ui.md. That rule carries the mechanism in full and names this file, so the file was re-deriving it. 474c1e9
  • Pushed back, left open — folding the notice into storagePlugin. That plugin returns early when disabled and when any Cloudflare credential is missing, so a notice below those returns would mount in neither local dev nor the test suite. It also keys off the hardcoded STORAGE_BACKENDS map rather than collection.upload. Both cover the same 8 collections today — say the word and I will fold it.

Lean gate green: lint, typecheck, typecheck:tests, 2291 unit. No integration re-run — the commit changes a comment only, and nothing in the sanitized config.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. awaiting labels Oct 7, 2026
Two plugins did one job. The notice is about an upload, so it belongs with
the plugin that owns uploads, and uploadNoticePlugin's only reason to exist
separately was that storagePlugin returns early when disabled and again when
any Cloudflare credential is missing.

Applying the transform above both returns removes that reason. A save still
posts a file on all three paths — local dev, the test suite, migrate:create —
and the notice now mounts on each of them, which the standalone plugin also
did and a fold below the returns would not.

It stays keyed on collection.upload rather than STORAGE_BACKENDS, so a new
upload collection is still covered before anyone picks its backend. The
component path is unchanged, so the generated import map is untouched —
generate:importmap finds no new imports, which is what proves the
registration is still live.

Both regressions the fold invites were watched failing: the notice applied
below one early return, and the notice keyed off the backend map.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VnoZhXSpH8pMvfkW5HAemh
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-892 October 9, 2026 16:53 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Review thread adopted. Pushed 670cbb5.

  • Adopted — fold the notice into storagePlugin. withUploadNotice moved to src/plugins/storage/uploadNotice.ts, applied above both early returns, so the notice still mounts when the plugin is disabled and when a Cloudflare credential is missing — your second clause. src/plugins/uploadNotice/ is gone and payload.config.ts registers one plugin fewer. Still keyed on collection.upload, not STORAGE_BACKENDS.

The fold moves the notice from second-to-last in plugins to fourth. Nothing registered after storagePlugin creates an upload collection today, so coverage is unchanged.

Lean gate green: lint, typecheck, typecheck:tests, 2293 unit. collections-smoke.int.spec.ts 19 passed. generate:importmap finds no new imports, which is what proves the component is still registered.

Both regressions the fold invites were watched failing: the transform below one early return, and the notice keyed off the backend map.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 9, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 2733a42 Oct 9, 2026
22 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-888-upload-notice branch October 9, 2026 17:21

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-892 — 670cbb58 Deployed Oct 9, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(admin-ui): show an uploading state while any upload collection saves a file

3 participants