Skip to content

Fix: use HMAC actor ID from first change in project creation#79

Merged
shikokuchuo merged 1 commit intomainfrom
initial-actorid
Mar 23, 2026
Merged

Fix: use HMAC actor ID from first change in project creation#79
shikokuchuo merged 1 commit intomainfrom
initial-actorid

Conversation

@shikokuchuo
Copy link
Collaborator

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 actorId React state from App — ReplayDrawer now reads it directly from the sync client via getActorId(), avoiding unnecessary re-renders.

@shikokuchuo shikokuchuo merged commit 14e2999 into main Mar 23, 2026
4 checks passed
@shikokuchuo shikokuchuo deleted the initial-actorid branch March 23, 2026 23:00
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
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