Skip to content

Upload GUI: deposit attestation and staged upload flow - #247

Merged
neuromechanist merged 3 commits into
stagingfrom
feature/issue-245-attestation-gui
Aug 19, 2026
Merged

Upload GUI: deposit attestation and staged upload flow#247
neuromechanist merged 3 commits into
stagingfrom
feature/issue-245-attestation-gui

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Closes #245. Also folds in the owner's live test feedback from today's upload run.

Attestation (#245)

  • New "Deposit attestation" fieldset on /upload, mirroring the CLI prompts: deposit type (owner vs licensed redistribution), re-identification key status (destroyed vs retained-by-institution), required de-identification confirmation, and, for redistribution only, the required no-duplicate affirmation plus an optional upstream source. Links the Data Contributor Terms via resolveDocsBase().
  • Sent as the optional attestation field on POST /datasets (DepositAttestation type in upload-client.ts mirrors the backend schema: deidentified is literally true; no_duplicate is true for redistribution and absent for owner deposits — the hidden redistribution controls are disabled so they can never leak into an owner payload or trip native validation).
  • Inputs lock during a run and unlock on failure/reset, following the existing name/description pattern.

Upload flow UX (owner test feedback, 2026-08-18)

  • Explicit validate step: dropping files now shows a "Validate dataset" button; pre-check runs on click, and the upload button only appears after validation.
  • Confirmation step: the upload button opens an inline "Create dataset X and upload N files (size)?" panel; nothing is sent until "Yes, create and upload".
  • CLI-style status: "Dataset nmXXXXXX created. Uploading N files (…)…" after create, "…all files uploaded. Finalizing…" before finalize.
  • Readable failures: per-file "Network error during PUT" walls collapse into one sentence naming the dominant cause, with a retry hint and support@nemar.org; the raw XHR error is now "Could not reach the storage service". (The total-loss failure itself looks like missing S3 bucket CORS for browser PUTs — tracked separately; this PR fixes the messaging, not the bucket.)
  • Dropzone cap copy loses the "(single-PUT for now)" jargon.

Tested: biome check clean, astro check 0 errors, 1070 unit tests pass, production build succeeds.

Attestation fieldset (#245) mirrors the CLI prompts: deposit type,
key status, required de-identification confirmation, redistribution
no-duplicate affirmation with optional upstream source; sent as the
optional attestation field on create. Upload flow is now staged per
owner test feedback: drop, explicit Validate button, inline are-you-
sure confirmation, then CLI-style status lines (dataset ID created,
uploading N files, finalizing). PUT failures aggregate into one
readable sentence instead of a per-file wall, and the dropzone cap
copy drops the single-PUT jargon. Tested: biome, astro check, 1070
unit tests, build.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploying nemar-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7e9f6da
Status:⚡️  Build in progress...

View logs

The display:grid rules on .confirm/.attest__redist/.precheck now carry
:not([hidden]) — an author display beats the UA [hidden] rule, so the
confirm panel and redistribution fields were rendering from first
paint (verified by reviewer in the built output). showConfirm freezes
name/description/attestation so a confirmation can never go stale for
an edited form, moves focus into the panel, and Cancel unfreezes and
returns focus. Confirm-yes no-ops while the panel is hidden. Also:
status cleared on retried submit, summarizer keeps error casing and
handles the single-file case (now unit-tested), upstream_source gets
a slice(0,500) backstop, de-identification copy says where applicable,
redundant token fallback dropped. Tested: biome, astro check, 1075
tests, build.
A second drop while the confirm panel was open tore it down via
hideConfirm without re-enabling name/description/attestation. The
unfreeze now lives in hideConfirm itself; confirm-yes re-locks
synchronously right after, so it stays safe.
@neuromechanist
neuromechanist merged commit d0ba2bd into staging Aug 19, 2026
1 of 2 checks passed
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