Skip to content

Docs: add missing MetadataStore to store-structure.md - #4968

Open
lmac-1 wants to merge 1 commit into
mainfrom
update-claude-store
Open

Docs: add missing MetadataStore to store-structure.md#4968
lmac-1 wants to merge 1 commit into
mainfrom
update-claude-store

Conversation

@lmac-1

@lmac-1 lmac-1 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Description

store-structure.md catalogued only 10 stores but createMetadataStore.ts was already wired into StoreProvider.tsx and undocumented. This PR adds the MetaDataStore entry, corrects layer/pattern lists and the store count (10 -> 11).

It also fixes the Pattern 2 example, which misattributed updateJob/updateWorkflow as a hybrid Y.Doc + Immer writes when they're actually pure Y.Doc only (Pattern 1); repoints the example at the real hybrid case (removeJobAndClearSelection) and carries forward the "use sparingly" caveat from the store's own header comment

Validation steps

  1. No code changes, just Claude docs update.

Additional notes for the reviewer

  1. We should find a way to make sure we are updating the Claude docs are part of big changes with stores.
  2. I have not updated the changelog as it's an internal docs change. Let me know if this is wrong.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

Document createMetadataStore.ts (per-job adaptor metadata cache), correct
the store count from 10 to 11, and fix the Pattern 2 example which
misattributed updateJob/updateWorkflow as hybrid Y.Doc+Immer when they're
pure Pattern 1.
@github-project-automation github-project-automation Bot moved this to New Issues in Core Jul 14, 2026
@github-actions

Copy link
Copy Markdown

Security Review ✅

  • S0 (project scoping): N/A — the only change is documentation in .claude/guidelines/store-structure.md; no queries or entrypoints touched.
  • S1 (authorization): N/A — no controller, LiveView, channel, or policy code is modified.
  • S2 (audit trail): N/A — no config-resource writes; the change is purely markdown guideline text.

@lmac-1
lmac-1 requested a review from stuartc July 14, 2026 07:42
Command → write to Y.Doc/Awareness → produce() for immediate UI → notify()
(Observer also fires but state already matches = idempotent)
```
**Note:** this is a hybrid pattern and should be used sparingly — evaluate whether

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartc this came up when it was reviewing, it suggested making these 2 updates aswell in "Pattern 2 section". Do you agree with them, or should we just keep it to MetaDataStore updates? (I'm conscious of not wanting to add too many unnecessary words)

@lmac-1 lmac-1 moved this from New Issues to In review in Core Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant