Skip to content

fix: bind reviewed-page retries to saved draft - #48

Open
jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:kronowave/reviewed-page-draft-binding
Open

jz-krono wants to merge 1 commit into
CopilotKit:mainfrom
jz-krono:kronowave/reviewed-page-draft-binding

Conversation

@jz-krono

@jz-krono jz-krono commented Oct 3, 2026

Copy link
Copy Markdown

User workflow

A Dot presents a Markdown draft for owner review before saving it to a Space. When a save response is lost or the card reconnects, an unchanged review should recover the same saved page. If the title, content, or destination changes while the thread and tool-call ID stay the same, the card should identify the existing save and require a new review for the changed draft.

Change

  • Persist the normalized original draft alongside each new reviewed-page receipt. Existing databases gain the new column on startup, and earlier receipts remain readable.
  • Return the original review draft during receipt recovery, even when the saved page has since been edited.
  • Accept identical retries and return HTTP 409 for changed drafts under an existing receipt. Preserve the current Space-access check.
  • Reconcile the restored receipt with the card's displayed draft before showing it as approved or sending a continuation. Show a review conflict with a link to the previously saved page when they differ.
  • Document the matching-retry behavior in the README.

Reproduction and verification

On the pinned base commit c2569bb6, saving draft A and then submitting draft B with the same thread and tool-call ID returned HTTP 201 with page A. With this change, the second request returns HTTP 409; the original page and receipt remain intact.

Regression coverage exercises identical retries, changed title/content/destination, title normalization, receipt recovery after page edits, Space revocation, database migration/restart, and client recovery before a decision. The existing page-review recovery tests continue to pass.

  • Node 24.19.0, npm 11.9.0.
  • Full Vitest suite: 35 files, 166 tests passed.
  • npm run check-format, npm run lint, npm run typecheck, npm run build: passed.
  • UI QA: reviewed the conflict-state rendering logic, native keyboard buttons, and narrow-screen wrapping styles. Interactive viewport QA is the next verification step.

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