Repository navigation
factory: a page's history names the version the page holds (film D12) - #2658
Merged
Merged
Conversation
The server agent's text on a page edited live is kept as the newest version without being applied, so a client that called the highest version current called a version the page does not hold current, and offered no Restore on it. GET .../versions now answers live_version (the newest version the page held: a snapshot of the live document or a restore) and marks the agent's unapplied versions kept until a restore names them. The agent's words now match what History shows: "Kept · not applied", and Restore this version to apply it. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
ZeroPoint95
pushed a commit
that referenced
this pull request
Nov 24, 2026
…#2658) The server agent's text on a page edited live is kept as the newest version without being applied, so a client that called the highest version current called a version the page does not hold current, and offered no Restore on it. GET .../versions now answers live_version (the newest version the page held: a snapshot of the live document or a restore) and marks the agent's unapplied versions kept until a restore names them. The agent's words now match what History shows. Assisted-by: CodeAF Co-Authored-By: CodeAF <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Film D12: while a page is edited live, the server agent's text is kept as the newest version, not applied (
workstream_agent.go). The desk marked the highest version current and offers Restore only on non-current rows. So History called the agent's version current while the page didn't hold it, and the agent's "restore it from history" couldn't be followed.GET /v1/workstreams/{id}/pages/{pid}/versions(andfactory.org_workstream_page_versions) now answerslive_version: the newest version the page held, meaning an idle or manual snapshot of the live document, or a restore. A client marks that version current, never the highest number. It is absent when no version the page held is kept.kept: true. Restoring it applies it, makes the restore live, and clearskept.versionsWireinworkstream_parts.go. The agent's kept reason is the named constantversionReasonKept("agent"); the schema enum now lists it.internal/manual/chat/organization-workstream-agent.md.Proof
TestServerAgentsKeptVersionIsNotTheLiveOneUntilRestored: idle v1, then the agent's kept v2, giveslive_version1 with v2 kept. Restoring v2 gives v3 (restored_from2),live_version3, nothing kept, and the page's words hold the agent's text. It also checks the agent's words.TestPageVersionsNameTheLiveOneNeverTheHighest: table over empty, kept-only, kept above held, held above kept, and restored.make pr-ready BASE=f9aeb9fe2.Desk PR (marks current by
live_version, "Kept · not applied", Restore): to follow.🤖 Generated with Claude Code