4.3 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 05-quick-sharing | Simplify reviewed canvas sharing | done | 5 |
|
plan.md |
|
|
|
Task 05: Simplify reviewed canvas sharing
Summary
Make the active release's known distribution data visible before preparation and shorten the path from Share to reviewed downloads.
In scope
- Restore safe release metadata in the canvas HTTP projection. Add an authorized, release-bound export-defaults read that supplies the server's first compatible distribution version when the manifest omits one.
- Reuse the selected release's ID, version, name, description, author, source mode, and optional repository URL. Leave absent license and other author-supplied details explicit. Never guess a license.
- Recompose the desktop Dialog and phone Drawer around required gaps, Prepare downloads, and an editable Package details disclosure. Keep inventory, private-content warning, and two separate downloads.
- Localize copy in all required catalogs and update public sharing guidance.
Out of scope
Auto-publishing, changing the active release, persistent share profiles, and relaxing the distribution validator or download reauthorization.
Acceptance
- The example canvas opens Share with its package ID, current release version, description, and manifest author already present. License is the only author decision if the server supplies a valid compatibility minimum.
- Filling the remaining gaps permits one Prepare action, then shows the exact release's inventory and both downloads. Editing a field or changing release invalidates the review and requires fresh preparation.
- Desktop and phone flows retain drafts on validation error, announce loading/failure, provide Retry, and never download or publish before the review/explicit download action.
Verification
(cd apps/backend && go test ./internal/canvas ./internal/backendapp)
(cd apps/web && pnpm exec vitest run components/settings/canvas-share-dialog.test.tsx hooks/domains/canvas/use-canvas-share.test.ts)
(cd apps/web && pnpm e2e:run --host --project=chromium tests/canvas/canvas-sharing.spec.ts)
(cd apps/web && pnpm e2e:run --host --project=mobile-chrome tests/canvas/mobile-canvas-sharing.spec.ts)
(cd apps/web && pnpm run i18n:check)
Files likely touched
apps/backend/internal/canvas/distribution_export.goand testsapps/backend/internal/backendapp/canvas_distribution_routes.goand testsapps/backend/internal/backendapp/canvas_routes.goapps/web/lib/api/domains/canvas-distribution-api.tsapps/web/components/settings/canvas-share-dialog.tsxand testsapps/web/hooks/domains/canvas/use-canvas-share.tsand testsapps/web/hooks/domains/canvas/use-canvas-export-defaults.tsand testsapps/web/src/locales/*/canvases.jsonapps/web/e2e/tests/canvas/{canvas-sharing,mobile-canvas-sharing}.spec.ts- Relevant
docs/public/**sharing page
Dependencies
Task 04 is sequenced first because Share can use the latest mutable canvas name only when a release display name is missing. The two work orders also touch shared host API files.
Parallelism
sequential
Inputs
Results
Restored safe release metadata in host responses and added authorized,
release-bound export defaults with server-owned compatibility floor 0.95.0.
Share presents missing fields first, keeps package details editable, and
retains reviewed inventory and separate downloads. Canvas/backend tests,
typecheck, localization checks, focused unit tests, and desktop/phone sharing
E2E passed.
PR fixup preserves an unset source mode, exposes it as a required selector,
and rejects static export when retained entry files are missing. The defaults
request now lives in a domain hook; focused backend and dialog tests cover the
missing-entry and explicit-choice paths.