Fix: use HMAC actor ID from first change in project creation#79
Merged
shikokuchuo merged 1 commit intomainfrom Mar 23, 2026
Merged
Fix: use HMAC actor ID from first change in project creation#79shikokuchuo merged 1 commit intomainfrom
shikokuchuo merged 1 commit intomainfrom
Conversation
AdaWorldAPI
pushed a commit
to AdaWorldAPI/q2
that referenced
this pull request
Mar 25, 2026
…latest commits Cherry-picked 4 commits from quarto-dev/q2 main: - 14e2999 PR quarto-dev#79: Fix HMAC actor ID from first change in project creation (shikokuchuo) — pre-generate documentId, resolve HMAC actor before document creation, remove actorId React state from App - 9b96c55 Update hub-client changelog through 2026-03-23 (shikokuchuo) - d44e0f3 PR quarto-dev#81: Fix Windows compilation — cfg-gate unix permissions in json_filter tests (cderv) — extract make_executable() helper with platform-specific impls, add cross-platform rules for Claude Code - bb5764a Add browser document storage for offline document editing (vezwork) — enables offline editing with browser-local persistence https://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z
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.
This addresses issue 2 in #65. We will still want to upstream the simple solution, but we're able to work around in the meantime.
Issue
Project creator's session used random Automerge actor IDs because our HMAC actor ID (derived from the
indexDocId) was only available after document creation — a chicken-and-egg problem.Fix
Fix by pre-generating the documentId, resolving the HMAC actor, then creating documents via
Automerge.from()+repo.import()so every change uses the correct actor from the start.Also removes the
actorIdReact state from App —ReplayDrawernow reads it directly from the sync client viagetActorId(), avoiding unnecessary re-renders.