cleanup(web): drop dead outlet-context pass-through from IntelligenceLayout#32657
Merged
vex-assistant-bot[bot] merged 1 commit intoMay 30, 2026
Merged
Conversation
`IntelligenceLayout` consumed `useOutletContext()` and re-published
it via `<Outlet context={outletContext} />`. The pass-through was
dead — no descendant of the layout calls `useOutletContext()`, and
the layout itself sits under `ActiveAssistantGate` whose bare
`<Outlet />` resolves any parent context to `undefined` anyway.
Also dropped an internal source path from the docstring
("Platform source: AssistantPageClient.tsx ...") since this repo
is public — internal codebase pointers don't belong in
docstrings here.
Contributor
There was a problem hiding this comment.
✦ APPROVE — reviewed at 552c3c99fa
Surgical 5-line cleanup. Both factual claims in the PR body verified:
- No descendant reads outlet context.
grep -rn "useOutletContext" apps/web/src/returns zero hits (not just under intelligence children — across the entire web app). The 5 child routes (identity,plugins,skills,workspace,contacts) never read it. - The parent gate provides no context.
ActiveAssistantGatereturns bare<Outlet />with nocontextprop, so React Router wraps every matched child in<OutletContext.Provider value={undefined}>. The pass-through was definitionally undefined.
The misleading-precedent argument is the real value here — anyone scanning for "how does outlet-context flow in this codebase" would have found IntelligenceLayout as a working example and copied a pattern that's been broken since #32641. Removing the trap is worth more than the 5-line delta suggests.
Docstring cleanup (dropping the Platform source: AssistantPageClient.tsx lines 2250-2290 reference) is correct — this is a public repo, internal codebase paths shouldn't appear in docstrings.
Merge gate: CI 7/7 green, Devin clean, no inline comments, single-file diff, no behavior change. Mergeable.
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.
Tiny cleanup surfaced by a codebase-wide audit following PR #32641's outlet-context work.
Why
IntelligenceLayoutconsumeduseOutletContext()and re-published it via<Outlet context={outletContext} />. Both lines were dead:apps/web/src/finds zerouseOutletContext()calls under any of the layout's child routes (Identity, Skills, Workspace, Contacts, Plugins).IntelligenceLayoutsits underActiveAssistantGate(apps/web/src/routes.tsx). The gate renders a bare<Outlet />with nocontextprop, which wraps every matched child in<OutletContext.Provider value={undefined}>— that's the React Router source behavior and the exact reason PR refactor(web): publish assistant lifecycle through Zustand, drop outlet-context plumbing #32641 introduceduseChatLayoutSlotsStoreinstead of plumbing slot setters through the chat layout's outlet context.Removing 3 lines of misleading-but-functionally-dead code so the next person looking at outlet-context usage in this codebase doesn't think there's a working precedent here.
Also
Dropped one line from the docstring that referenced an internal-codebase path (
Platform source: AssistantPageClient.tsx lines 2250-2290). This repo is public; references to private codebase paths shouldn't live in docstrings here.Why safe
tsc --noEmitcleanlintcleanbun test src/domains/intelligence— 12/12 passuseOutletContextimport + read + thecontextprop on<Outlet />— none of which were doing anything.References
<Outlet />'s own (undefined) context.useChatLayoutSlotsStoreto work around it for slot setters.https://claude.ai/code/session_01NjQuUAiXsS4DVEmKPsb1uE
Generated by Claude Code