fix(components): ask the githubIntegration capability before drawing a GitHub surface - #15
Draft
pythonlearner1025 wants to merge 3 commits into
Draft
fix(components): ask the githubIntegration capability before drawing a GitHub surface#15pythonlearner1025 wants to merge 3 commits into
pythonlearner1025 wants to merge 3 commits into
Conversation
added 3 commits
September 2, 2026 00:26
…a GitHub surface
`PLATFORM_CAPABILITIES` already names `githubIntegration` ("GitHub App
integration (repo registry, brokered tokens, PR status)") and
`LOCAL_PLATFORM_CAPABILITIES` is empty, so the answer is already false in every
local composition. `auto-archive-pr-watcher.tsx`, `general-setting.tsx` and
`integrations-setting.tsx` make that check; the Session surfaces never did.
A local clone carries a GitHub remote, so `repoFullName` is non-empty whether or
not the app can reach the GitHub App. On a local build that is enough to light
up the info bar's GitHub actions, the PR panel tab, the PR badge, the
`@issue`/`@pr` mention categories, the `LodyAI#123` hydrator and the diff panel's
review-comment draft — every one of which ends at an App that is not connected.
`getSessionGitHubState` gains a third parameter, `gitHubIntegrationAvailable`,
defaulting to true so every existing caller keeps today's behaviour. With it off
both `repoFullName` and `latestPr` answer empty, and every value the consumers
read is downstream of those two. The four call sites pass
`useAppCapability('githubIntegration')`. The composer's `resolveSessionRepoFullName`
and the chat landing's local-project repo resolution answer the same capability,
and "Connect more GitHub projects" renders only with it.
No new capability is invented and no new prop is added: this is the existing
gate, asked in the places that never asked it.
Model: claude-opus-5[1m]
…tion capability Model: claude-opus-5[1m]
…project selector now read a capability `PlatformContext` deliberately has no default: a missing provider is a programming error rather than an implicit cloud fallback. Three suites render these components bare, so asking `useAppCapability` from them makes those renders throw. Wrap each render in the existing `TestCloudPlatformProvider`. Model: claude-opus-5[1m]
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.
PLATFORM_CAPABILITIESalready namesgithubIntegration("GitHub Appintegration (repo registry, brokered tokens, PR status)") and
LOCAL_PLATFORM_CAPABILITIESis empty, so the answer is already false in everylocal composition.
auto-archive-pr-watcher.tsx,general-setting.tsxandintegrations-setting.tsxmake that check; the Session surfaces never did.A local clone carries a GitHub remote, so
repoFullNameis non-empty whether ornot the app can reach the GitHub App. On a local build that is enough to light
up the info bar's GitHub actions, the PR panel tab, the PR badge, the
@issue/@prmention categories, the#123hydrator and the diff panel'sreview-comment draft — every one of which ends at an App that is not connected.
getSessionGitHubStategains a third parameter,gitHubIntegrationAvailable,defaulting to true so every existing caller keeps today's behaviour. With it off
both
repoFullNameandlatestPranswer empty, and every value the consumersread is downstream of those two. The four call sites pass
useAppCapability('githubIntegration'). The composer'sresolveSessionRepoFullNameand the chat landing's local-project repo resolution answer the same capability,
and "Connect more GitHub projects" renders only with it.
No new capability is invented and no new prop is added: this is the existing
gate, asked in the places that never asked it.
Compatibility
Every change is additive at its default. With the new prop, parameter or flag
absent, the touched components render and behave exactly as they do today, and
no existing call site in this repository passes one.
Testing
packages/componentstypecheck and the full vitest suite pass. Addstests/session-github-state-capability.test.ts. The seven call sites are React hooks readinguseAppCapability; they are not unit tested here.Notes for the reviewer
No new capability and no new prop:
PLATFORM_CAPABILITIESalready declaresgithubIntegration,LOCAL_PLATFORM_CAPABILITIESis empty, andauto-archive-pr-watcher.tsx,general-setting.tsxandintegrations-setting.tsxalready make exactly this check.Review metadata
BlitzOS fork only. Delete this section before sending the PR to
LodyAI/Lody.blitz/seam-7-github-capability-gatef3474894 (the pinned upstream commit)