Skip to content

cleanup(web): drop dead outlet-context pass-through from IntelligenceLayout#32657

Merged
vex-assistant-bot[bot] merged 1 commit into
mainfrom
ashlee/cleanup-stale-outlet-context-passthrough
May 30, 2026
Merged

cleanup(web): drop dead outlet-context pass-through from IntelligenceLayout#32657
vex-assistant-bot[bot] merged 1 commit into
mainfrom
ashlee/cleanup-stale-outlet-context-passthrough

Conversation

@ashleeradka
Copy link
Copy Markdown
Contributor

Tiny cleanup surfaced by a codebase-wide audit following PR #32641's outlet-context work.

Why

IntelligenceLayout consumed useOutletContext() and re-published it via <Outlet context={outletContext} />. Both lines were dead:

  1. No descendant reads it. A grep across apps/web/src/ finds zero useOutletContext() calls under any of the layout's child routes (Identity, Skills, Workspace, Contacts, Plugins).
  2. It wouldn't work even if a descendant did read it. IntelligenceLayout sits under ActiveAssistantGate (apps/web/src/routes.tsx). The gate renders a bare <Outlet /> with no context prop, 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 introduced useChatLayoutSlotsStore instead 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 --noEmit clean
  • lint clean
  • bun test src/domains/intelligence — 12/12 pass
  • No external API or behavior change. The diff is useOutletContext import + read + the context prop on <Outlet /> — none of which were doing anything.

References

https://claude.ai/code/session_01NjQuUAiXsS4DVEmKPsb1uE


Generated by Claude Code

`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.
@ashleeradka ashleeradka marked this pull request as ready for review May 30, 2026 02:39
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@vex-assistant-bot vex-assistant-bot Bot left a comment

Choose a reason for hiding this comment

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

APPROVE — reviewed at 552c3c99fa

Surgical 5-line cleanup. Both factual claims in the PR body verified:

  1. 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.
  2. The parent gate provides no context. ActiveAssistantGate returns bare <Outlet /> with no context prop, 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.

@vex-assistant-bot vex-assistant-bot Bot merged commit cd2aa21 into main May 30, 2026
7 checks passed
@vex-assistant-bot vex-assistant-bot Bot deleted the ashlee/cleanup-stale-outlet-context-passthrough branch May 30, 2026 03:04
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.

2 participants