feat(publish): one Publish for all pending changes #161
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/156"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #156
What changes
content/andassets/media/viaPOST /api/publish-all. The chip, error strip with Retry, build-failed dialog and host-nav refresh are kept.POST /api/page/publishremoved. It now answers 404 like any unknown path.handlePagePublish, its route, its mutation-lock entry andpublishPathsForare deleted.gitrepo.PublishPathsandStatusForPathsstay as tested package API./api/publish-allacceptscheckDraftLinks: true. The check runs after the empty check and before the pre-flight..mdundercontent/, added or modified vsmain) that is not itself disabled, for links to disabled (front-matterdraft) pages.<a href>and link-typed params, matched by content path and pretty URL.{"warning":{"disabledLinks":[{page,title,linkedFrom:[{page,title}]}]}}and commit nothing.{lang}-only request (deckle-hosted's e2e) behaves exactly as before and never warns.scaffold/site/AGENTS.mdnow describe one Publish. They say it ships every editor's pending changes, and that Disable and Discard… are the only ways to hold a change back.Verification
make test: web 68 files / 1860 tests passed;go test ./...all ok;tsc --noEmitclean./api/page/publishanswers 404.{lang}-only request publishes despite a link to a disabled page.checkDraftLinks:truein the request body.checkDraftLinks:false.c94bc74): it calls only/api/publish-allwith{"lang":"en"}.🤖 Generated with Claude Code
Remove the per-page Publish (page module and entry editor toolbars) and POST /api/page/publish, which now answers 404. The header's button, renamed "Publish", publishes every pending change under content/ and assets/media/ through /api/publish-all, standalone and inside a host's bar. The draft-link check moves to publish-all, opt-in through the new checkDraftLinks request field and narrowed to links to disabled pages (front-matter draft) from every carried page that is not itself disabled. A warning answers {"warning":{"disabledLinks":[{page,title,linkedFrom}]}} and publishes nothing; the editor shows a dialog naming each disabled page and the pages linking to it, with Cancel and Publish anyway. Retry repeats the request that failed. A {lang}-only request (deckle-hosted) behaves as before and never warns. Per-page publish tests still covering live behavior are ported to publish-all. README and scaffold/site/AGENTS.md describe the one Publish. Closes #156 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>[autoland] verdict: pass
PASS — validated against #156.
Signal relied on: Forgejo Actions
ci / build-and-testgreen on head20cdadc(web build+test,go vet,go test ./...with Hugo 0.163.3 installed, so the real-Hugo publish/pre-flight tests ran). Not re-run. Head already containsmain; no conflict.Checked:
Closes #156present (AFK branchafk/156)./api/page/publishroute, handler, mutation-lock entry andpublishPathsForremoved;/api/publish-allgains opt-incheckDraftLinks, run after the empty check and before the pre-flight. A{lang}-only request is unchanged and never warns (deckle-hosted contract). The check scans added/modified.mdunder the content root, skips disabled sources, targets only front-matter drafts; node paths are page-file paths, so titles/skip lookups resolve. Remaining helpers all still have callers;PublishPaths/StatusForPathskept as tested package API, as the issue allows.DisabledLinksDialoglists each disabled page with its linking pages; Publish anyway postscheckDraftLinks:false; Retry repeats the last request's flag; success still refetches badges.{lang}-only publishes despite a disabled link, warning shape + no commit/push, carried never-published target and disabled source don't warn, empty when nothing pending; the fixture exercises markdown,<a href>and link-param scans. Per-page coverage ported to publish-all (pre-flight failure, feedback, degraded git, missing library file, branch mode).scaffold/site/AGENTS.mddescribe one Publish, including that it ships every editor's pending changes and that Disable / Discard… are the only holds. No stale "Publish all" / per-page references remain.No CONCERNS.