Skip to content

feat(connections): move the Crew GitHub sign-in switch into Feature previews - #32216

Merged
bolichen97 merged 1 commit into
mainfrom
feat/crew-oauth-feature-preview
Nov 8, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/crew-oauth-feature-preview

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The owner turns Crew's own GitHub sign-in on and off from Settings > Developer > Feature previews, instead of hand-editing config.json.

Today the switch is connections.crew_oauth (connections/crew_oauth.py FLAG_KEY, enabled()). It is not in the config schema, so kirocrew config set connections.crew_oauth true answers ❌ Unknown key: connections.crew_oauth. The only way to turn it on is to edit the file by hand. Owner request.

Why it matters

A switch nobody can set through the product is a switch only people who read the code can use. The owner wants the Crew OAuth trial (#29543, #31149) behind the same preview mechanism every other unreleased feature uses.

Not a goal

What changed (motivation → approach → change)

Followed the Explore preview (#27449) exactly: one name in FEATURE_PREVIEW_FLAGS, one key in previewFlags.ts, one card in FeaturePreviewsSection.tsx, then the generated files.

  1. src/kiro_crew/config/sections_dashboard.py: crew_oauth added to FEATURE_PREVIEW_FLAGS. That makes dashboard.feature_previews.crew_oauth a schema path, so config set, the dashboard PATCH and change cards accept it. Default off (absent).
  2. src/kiro_crew/connections/crew_oauth.py enabled(): on only when dashboard.feature_previews.crew_oauth is literal true, read from the loaded config (KiroCrewConfig.load(), so a config.local.json overlay decides exactly as the dashboard switch shows; GPT review). The old hand-edited connections.crew_oauth is now ignored (conductor ruling after the UX review: with two keys the switch could show Off while the feature was on; this is a personal tool, so the owner flips the switch once). Every caller (manages, owns, status.py, warm.py, handlers, KAS projection) already goes through enabled(), so nothing else changes. manages() still needs the flag AND KAS.
  3. website/src/utils/previewFlags.ts: PREVIEW_CREW_OAUTH (mc-preview-crew-oauth) in PREVIEW_FLAGS. The dashboard does not read it; it only writes the gateway path.
  4. website/src/pages/settings/FeaturePreviewsSection.tsx: one plain toggle card, like Ultra Mode's, plus its previewFlagLabel case (previewSurfaces.test.tsx now counts 10 ⓘ tips). Copy, after three UX reviews:
    • Label: "GitHub sign-in by Kiro Crew"
    • Summary: "Lets Kiro Agent chats use your GitHub profile, orgs and public repos. Turn it on, then connect GitHub in Customize > Connections." (plain text naming the nav path; no link, per the Feature Previews ingress pin) (the scopes are the registry's read:user, read:org, public_repo)
    • Hint (ⓘ): "Kiro Crew signs in to GitHub itself. Disconnect GitHub on Connections to remove access."
    • No link on the card: Feature Previews gives a door only to a page missing from the nav (hiddenFromNav, e.g. Webhooks), and Connections is in the nav.
      Windows: main's feat(connections): Crew OAuth and kirocrew-secrets on Windows over verified loopback TCP #32221 serves Crew OAuth on Windows over verified loopback TCP, so enabled() has no Windows gate and the copy states no Windows limit.
  5. i18n: the three keys in all 12 catalogs ({{productName}} for the product name), each language's register rule (du/tu/ты/तुम/তুমি), en-XA regenerated with npm run i18n:pseudo.
  6. Generated: config-baseline.json, settingsRegistry.gen.ts + settings-registry.generated.json (npm run gen:settings), ui-index.generated.json (npm run gen:ui). src/kiro_crew/docs/configuration.md lists the new name and says the old key is ignored; docstrings, the feature-map row and the phase-1 row of docs/request-for-change/rfc-crew-owned-oauth.md (beside main's phase-1b Windows row, which keeps "same flag"), and the comments in docs/architecture/mcp.md, docs/system-specs/modules/connections.md, status.py, mcp_discovery_server_info.py and two dashboard type comments name the preview path.

Backwards compatibility

Breaking (small, deliberate): a config with only connections.crew_oauth: true now reads as off; turn on Settings > Developer > Feature previews > GitHub sign-in by Kiro Crew once. Writer sweep on origin/main: the key has no writer in the product (kirocrew config set refused it); only hand edits set it.

Reader: src/kiro_crew/connections/crew_oauth.py:enabled -- entry: chat|crew page -- now reads only the preview path (test_only_the_feature_preview_turns_it_on)

Tests

  • test_only_the_feature_preview_turns_it_on[...] (test/test_crew_oauth_mvp.py, real config.json in a temp home): preview on → True; preview false → False; "yes" → False; a non-object value → False; old connections.crew_oauth: true alone → False.
  • test_the_config_local_overlay_decides_like_the_dashboard[...]: base on + config.local.json off → False (True before this fix); base empty + overlay on → True.
  • test_windows_reads_the_flag_like_posix (main's, kept): Windows with the preview on → True.
  • test_the_flag_is_off_unless_config_says_true: empty config off, preview on → on.
  • Existing pins cover the list parity: test/test_feature_previews_config.py and website/src/test/previewFlagServerSync.test.tsx.

Local runs on the head rebased onto origin/main bc6579b4a4 (touched/covering only, under the test lock): crew OAuth (incl. test_crew_oauth_windows_tcp.py), disconnect, preview-config, configuration-doc and config-baseline Python tests 183 passed, 4 skipped; vitest src/i18n (with I18N_BASE_REF=origin/main), previewSurfaces (link census unchanged: only Open Webhooks), previewFlagServerSync, featurePreviewsSectionNotice, settingsRegistry 1280 passed; npm run i18n:check, tsc, the brand gate and the comment-history gate clean.

Proof: not provable -- other: new behavior on a new config path (dashboard.feature_previews.crew_oauth)

Manual verification

On a throwaway data home: kirocrew config set dashboard.feature_previews.crew_oauth true → ✅ dashboard.feature_previews.crew_oauth = true, written under dashboard.feature_previews.

Screenshots / video

Built SPA from this head, stubbed API. The card, off by default:

GitHub sign-in by Kiro Crew card, off

The ⓘ hint open:

The hint tooltip open

Related Issues

Refs #29543, #31149

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 7, 2026 08:24
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of f2c85fec981698b06ffb7613852284e9eb37d85a — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the switch moves into the existing preview mechanism, every caller already goes through enabled(), and the PR lists the one dropped key as an accepted break.

Notes

  • enabled() now calls the full KiroCrewConfig.load() on every call, not a raw file read. If manages()/owns() run on a per-request proxy path, that cost repeats. It's reversible, but worth measuring before the trial grows.

[DESIGN-REVIEWED] f2c85fe

Description read

[DESCRIPTION-READ] a6b557ec1a6fe23d1292e5e7199ffd6acc54cebfe38e943515755099df85fab7

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of f2c85fec981698b06ffb7613852284e9eb37d85a — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The flag still defaults to off. The old key that is now ignored was never in the schema and could only be set by hand-editing, and the description declares the break and gives the two-key mismatch as the reason.

What this change ships

Inventory (7 items) — 7 justified

Intent: the owner turns Crew's GitHub sign-in on and off from Settings > Feature previews instead of hand-editing config.json. This is an ADDITION.

  1. New "GitHub sign-in by Kiro Crew" toggle card in Feature previews, off by default — justified
  2. kirocrew config set and the dashboard PATCH now accept dashboard.feature_previews.crew_oauth — justified
  3. A hand-edited connections.crew_oauth: true no longer turns the feature on — justified
  4. The switch now follows config.local.json overlays, so it matches what the dashboard shows — justified
  5. The setting is findable through command-palette search and the find_ui index (generated) — justified
  6. Card label, summary and hint in all 12 locales — justified
  7. Docs, the RFC phase-1 row and comments name the new key path — justified

[FIRST-PRINCIPLES-REVIEWED] f2c85fe

Description read

[DESCRIPTION-READ] ec51d099377e0fb88b956854ebff1180e554fc7fde858eff1ce1928c57f620cb

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ human override accepted

@iamwhatever overrode this lane for f2c85fec981698b06ffb7613852284e9eb37d85a via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed f2c85fec981698b06ffb7613852284e9eb37d85a — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] f2c85fe

Verdict parsed from the review's SHA-scoped output markers for commit f2c85fec981698b06ffb7613852284e9eb37d85a.

False positive or not applicable? A repository writer can comment:
/ai-review override fable f2c85fec981698b06ffb7613852284e9eb37d85a false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of f2c85fec981698b06ffb7613852284e9eb37d85a and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f2c85fe

False positive or not applicable? A repository writer can comment:
/ai-review override gpt f2c85fec981698b06ffb7613852284e9eb37d85a false-positive: <reason, 20 to 500 characters>

@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from 01b19ad to ce68672 Compare November 7, 2026 08:44
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from ce68672 to 6af8a24 Compare November 7, 2026 09:21
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from 6af8a24 to 22dacbd Compare November 7, 2026 09:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from 22dacbd to f9d72f5 Compare November 7, 2026 09:57
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from f9d72f5 to c1735a7 Compare November 7, 2026 12:30
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026
bolichen97
bolichen97 previously approved these changes Nov 7, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving c1735a7.

What I checked on this head:

  • All 99 checks are green and none is pending. The Design, First Principles and UX lanes pass, and the Opus and GPT lanes have no blocking findings.
  • The switch moves and nothing else about the feature changes. crew_oauth joins FEATURE_PREVIEW_FLAGS, so dashboard.feature_previews.crew_oauth is a schema path that config set and the dashboard accept. enabled() reads only that path, and only a literal true counts. A missing, non-dict or unreadable config reads as off, and Windows still reads it as off. Every caller already goes through enabled(), and manages() still needs the flag and the KAS backend, so custody is not widened.
  • The feature stays off by default. The old hand-edited connections.crew_oauth is now ignored, which the description states as a deliberate small break for a trial that had no product way to set it, so no setting is made stricter for anyone who did not edit the file by hand.
  • The card follows the existing preview pattern (one name, one key in previewFlags.ts, one toggle in FeaturePreviewsSection.tsx). The three copy keys are in all 12 catalogs, and the generated files are part of the diff. I relied on the green checks for those and did not regenerate them.
  • No regex in the added product code.

I set auto-merge on this head.

@bolichen97
bolichen97 enabled auto-merge (squash) November 7, 2026 14:04
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from 93c0dc0 to 203a9b9 Compare November 7, 2026 23:43
@iamwhatever

Copy link
Copy Markdown
Contributor Author

UX Review, on "cannot find the Connections page" (head 93c0dc0, and the earlier ask for an "Open Connections" link):

This PR does not add a link from the card, on purpose (owner ruling).

  • The Feature Previews ingress pin gives a door only to a page with no other way in. website/src/test/previewSurfaces.test.tsx says: "webhooks is hiddenFromNav, so its card is that page's ONLY door and carries a link once on. No other card here does." Only notifications, webhooks and apps set hiddenFromNav: true in website/src/surfaces/surfaceData.ts.
  • Connections is in the nav: the rail entry Customize (/capabilities, not hiddenFromNav) opens it, and its Connections tab is CAPABILITY_SUB_ITEM_NAV { tab: 'mcp', label: 'Connections' } in the same file, which can also be pinned to the rail. /connections redirects there.
  • First Principles blocked the link on this ground on 93c0dc0, so head 203a9b9 removes it and the census is back to only Open Webhooks.

The scope is frozen after this push. Later UX notes get answers here, not code.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 7, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

UX Review on 203a9b9 ("the next step points to a page the reader cannot find"): answered here, with no code change. The owner froze this PR's scope after the last push.

  • Where Connections is: It is the Customize → Connections tab (CAPABILITY_SUB_ITEM_NAV { tab: 'mcp', label: 'Connections' } in website/src/surfaces/surfaceData.ts). Customize is a normal rail entry (capabilities, not hiddenFromNav), the tab can be pinned to the rail, and /connections redirects there. The card names the page by the label the reader sees on that tab.
  • No link on the card: This is the Feature Previews ingress pin: only a hiddenFromNav page (Webhooks) gets a door from its card. First Principles blocked a link on that rule on 93c0dc0, and the owner ruled to keep the pin.
  • Spelling out "Customize → Connections" in the copy: This is a reasonable follow-up for a later copy PR. It is out of scope here.
  • The notes ("Kiro Agent" vs "Kiro Crew" wording; the ⓘ tooltip covering the row above, which is how the shared SettingsToggle tooltip opens for every card on this page): these are also follow-ups, not changes in this PR.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Nov 8, 2026
…reviews

connections.crew_oauth was a hand-edited config.json key that
kirocrew config set refuses as an unknown key. It is now the
default-off Feature Preview dashboard.feature_previews.crew_oauth
(Settings > Developer > Feature previews). The legacy key still
turns it on; either true is on. A Windows gateway reads both as off.
Custody is unchanged: manages() still needs the flag AND KAS.

Refs #29543 #31149
@iamwhatever
iamwhatever force-pushed the feat/crew-oauth-feature-preview branch from 203a9b9 to f2c85fe Compare November 8, 2026 00:35
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 8, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override ux f2c85fe owner-decision: Owner decision. The preview switch shares nothing by itself; GitHub access starts only after Connect on Customize > Connections, which is in the left nav. A link from the card is refused by the Feature Previews ingress pin (only hiddenFromNav pages get a door), and the PR is scope-frozen. Accepting the remaining UX span as answered in-thread.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

AI-review override not recorded: class owner-decision needs a link to the owner's decision comment (https://github.com/<owner>/<repo>/pull/<n>#issuecomment-<id>) in the reason. Use /ai-review override <fable|gpt|design|ux|first-principles|scope|all> <current-sha> <class>[ #N]: <reason, 20 to 500 characters>, where <class> is one of false-positive, not-applicable, pre-existing, evidence-supplied, infra-failure, reissue, deferred, owner-decision. What each class needs: docs/ci/ci-and-reviews.md#risk-release-records.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Owner decision (UX Review on f2c85fe): I accept the remaining UX span as answered. The preview switch shares nothing by itself; GitHub access starts only after Connect on Customize > Connections, which is in the left nav. A link from the preview card is refused by the Feature Previews ingress pin (only hiddenFromNav pages get a door), and this PR is scope-frozen. No further copy change on this PR.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

/ai-review override ux f2c85fe owner-decision: Owner decision #32216 (comment) - the switch shares nothing until Connect on Customize > Connections (left nav); a card link is refused by the Feature Previews ingress pin; PR is scope-frozen.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Human judgment recorded

@iamwhatever recorded a owner-decision release (class owner-decision) for the ux AI finding on f2c85fec981698b06ffb7613852284e9eb37d85a.

Owner decision #32216 (comment) - the switch shares nothing until Connect on Customize > Connections (left nav); a card link is refused by the Feature Previews ingress pin; PR is scope-frozen.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving again at f2c85fe. Against our approval at c1735a7, the range-diff shows only a rebase onto main: the commit's own patch is unchanged. All checks pass.

@bolichen97
bolichen97 disabled auto-merge November 8, 2026 03:14
@bolichen97
bolichen97 merged commit b8cd344 into main Nov 8, 2026
101 of 102 checks passed
@bolichen97
bolichen97 deleted the feat/crew-oauth-feature-preview branch November 8, 2026 03:14
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026

@bolichen97 bolichen97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A correction to my approval at f2c85fe. I wrote that the range-diff showed only a rebase. That is right against the head we approved earlier, c1735a7: the move from connections.crew_oauth to dashboard.feature_previews.crew_oauth was already in that head and is accepted. The only differences since are the same key name updated in docs and comments that main added after c1735a7, plus main's own changes to the surrounding code. No migration of the old key is needed: the product never had a UI to set it, and the preview defaults to off. All checks pass.

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