Skip to content

fix(tags): commit option selections through GraphQL Soup - #5493

Draft
gbirman wants to merge 2 commits into
mainfrom
spotlight-tag-refresh-lag
Draft

fix(tags): commit option selections through GraphQL Soup#5493
gbirman wants to merge 2 commits into
mainfrom
spotlight-tag-refresh-lag

Conversation

@gbirman

@gbirman gbirman commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The tag picker's optimism and invalidation both target the normy Soup cache, which the GraphQL transport never populates — so with enable-graphql-soup on, a tag applied from a row only appeared after a full page reload. This adds updateEntityPropertyOptions to the graph, keeping the add/remove delta semantics so concurrent edits to the same property still compose, and routes the picker through it with a normalized-cache write.

A set's first tag has no property record to patch until the server answers (and properties is a link list a bare record write does not extend), so that case rides the in-flight mutation overlay plus a post-commit revalidation of the cached list variants that hold the entity — discovered through id-only membership documents, since a full-item selection misses any variant where some selected field was never written.

Verified on a local stack with the flag forced on: first tag in the flat Files view and in the grouped Tasks view both land without a reload, removal is instant under an artificially delayed mutation, and a forbidden write reverts the optimistic chip.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 503195cd-a589-42b9-8292-65e479d11eb3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

gbirman added 2 commits August 7, 2026 10:44
The tag picker's optimism and invalidation both targeted the normy Soup
cache, which the GraphQL transport never populates, so a selection only
surfaced after a full reload once enable-graphql-soup was on.

Adds updateEntityPropertyOptions to the graph, keeping the add/remove
delta semantics so concurrent edits to the same property still compose,
and routes the picker through it with a normalized-cache write. A set's
first tag has no property record to patch until the server answers, so
that case rides the in-flight overlay and a post-commit revalidation of
the cached list variants holding the entity.
Rows render the overlay on every pass, and importing it from the mutation
module dragged the REST and GraphQL clients — and with them the Soup
websocket — into every consumer that only wanted to display a pending
tag. Under jsdom that surfaced as unhandled "ws does not work in the
browser" rejections from the tag row test.
@gbirman
gbirman force-pushed the spotlight-tag-refresh-lag branch from 44dd63c to 710d0be Compare August 7, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant