Repository navigation
Conversation
Closing a context chip in the PostHog AI composer recorded its key and dismiss group globally, so another page that attached the same key or reused the group name lost its chip too. Record each dismissal against the URL path it happened on and filter by the current path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Scoping a dismissal by URL path brought a closed chip back when a scene changed its path between tabs, such as a workflow's Metrics tab or an insight's edit mode, so removed context rode the next message. The store now records dismissals against a generic dismiss scope, and maxGlobalLogic, which the app shell always mounts, sets it to the active scene. A dismissal holds across a scene's tabs and entities and never reaches another scene. The store stays free of sceneLogic, so mounting it does not mount the scene router. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maxGlobalLogic now sets the dismiss scope from a sceneId subscription instead of two scene action listeners and a mount seed. sceneId already changes on both setScene and setExportedScene, and the subscription also fires on mount. The scope test now returns with a re-keyed member of the dismissed group, so it fails if the group dismissal stops holding in its own scene. The Max test imports the store through the api/logics facade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Risk: No findings This change scopes context-chip dismissals in the PostHog AI attached-context store to the active scene, with Sentinel reviewed |
👀 Auto-assigned reviewersThese soft owners were skipped because they only have minor changes here. Nothing blocks merge, so self-assign if you'd like a look:
Soft owners come from each directory's |
Problem
Merge Danger
Note
🔵 Merge risk: low · two-way door (merge-risk rubric)
maxGlobalLogicstops setting the scope, every dismissal falls back to one shared scope, which is today's behavior.Changes
attachedContextLogicrecords dismissals against a genericdismissScope, set withsetDismissScope.dismissedKeysanddismissedGroupsstay as selectors for the current scope.maxGlobalLogic, which the app shell always mounts, sets the scope to the active scene from asceneIdsubscription.sceneLogic. Connecting it would mount the scene router wherever the store mounts.Close both chips on a workflow's Workflow tab, then open other views. Captured in Storybook with a scratch story that drives the real
maxGlobalLogicbridge; the story is not committed.How did you test this code?
Test rationale:
attachedContextLogic.test.ts: oneit.eachcase, for an ungrouped and a grouped chip. It fails on master, where the other scope stays hidden, and if a dismissal stops sticking when its scope comes back. The grouped case comes back with a new member of the group, so the group dismissal must hold, not only the key. The nearest existing tests cover one scope only.maxGlobalLogic.test.ts: oneit.eachcase that the scope follows the active scene. It fails if the wiring breaks, which would quietly make dismissals shared again.attachedContextLogicactions andcontextItems, andsceneLogic.setSceneintomaxGlobalLogic.Checks:
maxGlobalLogic, including the workflows, BI, picker, Max and task runner logics. All pass.Release status
Docs update
Updated the dismissal paragraphs in
products/posthog_ai/frontend/AGENTS.md,products/posthog_ai/frontend/README.mdand theintegrating-with-posthog-aiskill reference.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
setDismissScopefrommaxGlobalLogic. ConnectingsceneLogicfrom the store mounted the scene router in every test that mounts the store.sceneIdsubscription.sceneLogicsetssceneIdon both scene actions, so two listeners and a mount seed said the same thing three times.Involvement: 1 question answered. Review round 1 and a final read by GPT-6.1 Sol. QA swarm round 2 at the maintainer's request: GPT-6.1 Sol on correctness, risk, design, systems and the author's review perspective, Opus 5.5 on fresh eyes; 3 findings fixed, 1 rejected, then a clean final read. Review bots: none on the draft. Storybook proof captured at HEAD.
Agent: Claude Code, Claude Opus 5.5. Review by GPT-6.1 Sol through T3.
/tdd,/writing-kea-logics,/integrating-with-posthog-ai,/writing-tests,/editing-agents-md,/pr-description,/writing-pr-descriptions.dismissContext,dismissGroupand related terms found only feat(workflows): request a change to a code-managed email template through PostHog Code #119032, the workaround.🤖 Generated with Claude Code