Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle by lawsmd · Pull Request #1 · lawsmd/cortex · GitHub
Skip to content

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle - #1

Merged
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm
May 20, 2026
Merged

feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle#1
lawsmd merged 1 commit into
mainfrom
claude/cortex-orchestrate-claude-api-kjqkm

Conversation

@lawsmd

Copy link
Copy Markdown
Owner

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.

Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.

Adds a new "AI" section to Cortex Settings exposing the single toggle
"Allow Claude Code / Codex as orchestrate child agents", which is the
user-facing surface for FeatureFlag::LocalClaudeCodexChildHarnesses.
Upstream gates that flag for local /orchestrate children; on this fork
the whole point is to route them through the user's local Claude Code
login, so the new setting defaults to on and hydrates the runtime flag
at startup and on every toggle. The two existing gate sites
(local_child_harnesses.rs, orchestration_controls.rs) react live via
their existing is_enabled() checks — no restart needed.
@lawsmd
lawsmd merged commit 694aa36 into mainMay 20, 2026
3 checks passed
lawsmd pushed a commit that referenced this pull request May 22, 2026
…v#9600)
Closeswarpdotdev#9196.
### Description
Two `show_code_review_button` gates were dropping panel-open requests on
the floor when the user had hidden the toolbar button:
**1. Data-path gate at `Workspace::setup_code_review_panel`
(`view.rs:7982`)**
```rust
if !*TabSettings::as_ref(ctx).show_code_review_button {
return;
}
```
`update_right_panel_open_state` calls into this whenever the right panel
is being opened (chip click, `Shift+Cmd+=` keybinding, etc.), so the
early return silently swallowed every explicit user action.
**2. Render-path gate at `Workspace::render_config_panel` and
`render_config_panel_maximized` (`view.rs:18981` / `19040`)**
```rust
if !item.is_available(app) || !item.is_panel() { return None; }
…
if !HeaderToolbarItemKind::CodeReview.is_available(app) { return None; }
```
`HeaderToolbarItemKind::is_available` for `CodeReview` returns
`*TabSettings::as_ref(app).show_code_review_button.value()`
(`header_toolbar_item.rs:89`). So even after fix#1 set
`pane_group.right_panel_open = true` and `setup_code_review_panel` ran,
the next render frame saw `is_available() == false` and returned `None`
— the `right_panel_view` was never added to the layout.
This second gate is what @moirahuang flagged when their local repro
still showed nothing happening after the first fix landed. The data was
correct; the panel was just never composed into the UI.
### Fix
1. **Drop the early return at `setup_code_review_panel`.** The setting
is meant to gate only the toolbar button's visibility (already enforced
correctly by `header_toolbar_item.rs::is_available`, which feeds
`render_header_toolbar_button` at `view.rs:17276`).
2. **Switch panel-render call sites from `is_available` →
`is_supported`.** `is_available`'s own doc-comment says it's
specifically *"Whether this item should be shown in the **toolbar** —
checks both `is_supported` and user show/hide preferences."* Using it to
gate panel rendering conflates two unrelated concerns. Panel rendering
should only care about whether the feature is compiled in
(`is_supported`), not whether the user has hidden the toolbar button.
For `CodeReview`, `is_supported` is `cfg!(feature = "local_fs")`. For
the other variants in the same match (`TabsPanel`, `ToolsPanel`),
`is_available` already equals `is_supported` (default `_ => true` arm in
the inner match), so behaviour is unchanged. `AgentManagement` and
`NotificationsMailbox` return `None` unconditionally inside
`render_config_panel`, so the change is moot for them too.
### Caller audit for `setup_code_review_panel`
5 call sites in `view.rs`:
1. `view.rs:3681` — `TransferredTab` flow, only runs when the source tab
already had `right_panel_open == true`.
2. `view.rs:8136` — `update_right_panel_open_state` with `should_open ==
true`. **The diff-button path** that warpdotdev#9196 is about.
3. `view.rs:13372` — `PaneFocused` event, gated on `right_panel_open`
already true.
4. `view.rs:13490` — `RepoChanged` event, gated on `right_panel_open`
already true.
5. `view.rs:14458` — session env update, gated on `right_panel_open`
already true.
None of these need the `show_code_review_button` gate — they're either
explicit user actions or gated on `right_panel_open` already being open.
The toolbar button toggle continues to do its job at
`render_header_toolbar_button` independently.
### Testing
Reproduced @moirahuang's test locally on macOS 26.4.1 (Apple Silicon)
against `WarpOss.app` built from this branch:
1. Settings → "Show code review button" → **OFF**
2. `echo "x" >> README.md` inside a git repo
3. Click the diff stats chip on the prompt (`+1 -0`)
**Result:** Code review panel opens on the right showing the diff, while
the toolbar button stays hidden — exactly the expected behaviour from
issue warpdotdev#9196. Inverse case (toggle ON) also verified: toolbar button
visible, panel still works the same.
- `cargo fmt -p warp -- --check` passes.
- `cargo nextest` skipped locally — Metal toolchain unavailable on my
machine, mirroring warpdotdev#9277. CI will exercise the change.
### Server API
No server changes.
### Agent Mode
Not applicable.
### Changelog Entries
`CHANGELOG-BUG-FIX`: The diff button on the terminal prompt now opens
the code review panel even when the toolbar's "Show code review button"
toggle is disabled (regression from a recent release).
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>
@lawsmd
lawsmd deleted the claude/cortex-orchestrate-claude-api-kjqkm branch May 22, 2026 01:54
lawsmd added a commit that referenced this pull request May 22, 2026
Customize Warp's authentication / login surfaces (three canonical views
+ the 7-slide agent onboarding deck) to match Cortex's aesthetic.
Mapped in docs/investigations/auth-onboarding-three-views.md.
Auth view changes:
- View #1 (IntroSlide, `crates/onboarding/src/slides/intro_slide.rs`):
swap CORTEX ASCII to `figlet ansi_shadow`, brain glyph on top (35%
smaller at 146pt), centered title/brain column, outline-pink CTA
buttons that invert on hover (`CortexPinkOutline` button theme),
"Powered by Warp" credit under the title, Cortex version chip in
the top-left corner.
- View warpdotdev#2 (LoginSlideView, `app/src/auth/login_slide.rs`): all three
sub-screens (SelectAuthPathway, BrowserOpen, PrivacySettings)
routed through Cortex-specific centered single-column helpers;
upstream two-column `layout::static_left + render_visual` path
retired.
- View warpdotdev#3 (AuthView / AuthViewBody, `app/src/auth/auth_view_body.rs`):
Initial-variant reskin with horizontal naked-pink-brain +
Welcome-to/CORTEX-figlet header, centered "Powered by Warp" credit,
and three vertically-stacked pink-outline CTA buttons (Sign up /
Sign in / Skip for now) with hover-invert behavior. Texts rephrased
to clarify these are Warp account actions ("Sign up for a Warp
account" rather than just "Sign up"). Non-Initial
Warp-Drive-share-boundary variants stay upstream-shaped.
Agent onboarding deck (6 slides — Intention, Customize, Agent,
ThirdParty, Project, ThemePicker): each slide's render method now
bypasses `layout::static_left` so the right-side Warp UI screenshot
disappears; content renders centered single-column.
Foundation:
- Removed `SKIP_WARP_ACCOUNT_LOGIN` const and dropped
`skip_firebase_anonymous_user` from `app/Cargo.toml` default
features so the login surface fires as the default product
experience rather than being bypassed by the personal-use posture.
- New `crates/warp_core/src/cortex.rs` module hosts shared Cortex
branding constants (`BRAIN_PINK`, `CORTEX_ASCII`). `Icon` enum
gained a `WarpLogoWithLightTitle` variant mapped to the existing
warp-logo-with-light-title.svg asset for the "Powered by Warp"
wordmark rendering.
Dev launcher (`scripts/launch-cortex-dev.bat`) defaults to clearing
`HasCompletedOnboarding` on every launch so iteration on Views #1 / warpdotdev#2
surfaces them reliably; commented inline with the swap to flip into
AuthView (View warpdotdev#3) iteration mode.
Upstream-shaped helpers preserved with \`#[allow(dead_code)]\` for
merge clarity wherever the Cortex path supersedes them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lawsmd added a commit that referenced this pull request May 22, 2026
…i-kjqkm
feat(cortex-settings): AI section with /orchestrate Claude/Codex toggle
Sign up for freeto 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

@lawsmd@claude