Skip to content

fix(seal-tui): drop zed from modern-terminal allowlist (SEA-782)#503

Closed
mattwilkinsonn wants to merge 2 commits into
mainfrom
sea-782-drop-zed-modern-allowlist--apollo
Closed

fix(seal-tui): drop zed from modern-terminal allowlist (SEA-782)#503
mattwilkinsonn wants to merge 2 commits into
mainfrom
sea-782-drop-zed-modern-allowlist--apollo

Conversation

@mattwilkinsonn

@mattwilkinsonn mattwilkinsonn commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Pull request

Summary

Related issues

Changes

Test plan

Screenshots

Notes for reviewers


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Zed's terminal pane is built on `alacritty_terminal`, which doesn't implement the kitty keyboard protocol, so cmd+c never arrives as `SUPER+c` — classifying Zed as modern disabled copy-on-select and left selections uncopyable.

Co-Authored-By: seal <noreply@sealedsecurity.com>
@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

SEA-782

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2f0a6f29-2a97-4a2d-8999-e64bf4e664bc

📥 Commits

Reviewing files that changed from the base of the PR and between ad45cdb and faee26e.

📒 Files selected for processing (1)
  • crates/seal-utils/src/env.rs

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Adjusted terminal classification so Zed is no longer treated as a “modern” terminal; this restores the expected fallback behavior for copy/select and cmd+c in Zed.
    • Clarified modern-terminal detection so terminals that implement advanced keyboard protocols (kitty, wezterm, iTerm, foot, ghostty) remain recognized.
  • Documentation

    • Updated detection docs and examples to reflect these behaviors.

Walkthrough

Zed is removed from the modern-terminal allowlist so TERM_PROGRAM=zed no longer classifies as Modern; docs and tests updated, and a runloop comment was generalized about the fallback for terminals that don’t implement XTVERSION/kitty keyboard protocol.

Changes

Zed Terminal Detection Exclusion

Layer / File(s) Summary
Modern terminal allowlist exclusion and test verification
crates/seal-tui/src/terminal_cap.rs
MODERN_NAMES removes zed. Unit tests updated: TERM_PROGRAM=zed resolves to None, and remaining allowlist entries (kitty, ghostty, wezterm, iterm.app, iterm2, foot) resolve as Modern.
Documentation and comment clarifications
crates/seal-tui/src/terminal_cap.rs, crates/seal-tui/src/chat/runloop.rs, crates/seal-utils/src/env.rs
Docs for XTVERSION/TERM_PROGRAM probing clarified (iTerm.app example added), the runloop fallback comment was generalized (removed the Zed-specific callout), and a doc-comment wrapping near term_program() was adjusted.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibble code beneath the moonlit key,
Zed steps back from "modern" company,
Docs and tests now whisper what is true,
Fallback paths guide copy-on-select through,
A tiny hop—detection sings anew.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description consists entirely of PR template scaffolding with no substantive content related to the changeset. Add a brief description explaining why Zed was removed from the allowlist (e.g., its terminal pane doesn't implement kitty keyboard protocol).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing Zed from the modern-terminal allowlist.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sea-782-drop-zed-modern-allowlist--apollo

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Merge Queue - adds this PR to the back of the merge queue
  • Merge Queue Fast Track - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes Zed from the MODERN_NAMES allowlist in terminal_cap.rs, reversing an earlier classification that caused selections in Zed's terminal to appear highlighted but remain uncopyable. Zed's terminal is built on alacritty_terminal, which does not implement the kitty keyboard protocol, so the SUPER+c keypress never reaches the TUI; falling back to copy-on-select is the correct behavior.

  • MODERN_NAMES drops "zed", the detection logic in probe_term_program already returns None for any name not in the list, so no code change is needed beyond the constant.
  • The old term_program_zed_resolves_to_modern test is replaced by two new tests: one asserting TERM_PROGRAM=zed now returns None, and one that locks each remaining allowlist entry so accidental pruning is caught automatically.

Confidence Score: 5/5

Safe to merge — the change correctly removes Zed from the modern-terminal allowlist, restoring copy-on-select for Zed users whose cmd+c never reached the TUI.

The change is a one-entry constant removal backed by a clear technical rationale (alacritty_terminal lacks kitty keyboard protocol support) and by two new tests: one that pins the negative-match behavior for Zed, and one that regression-locks every remaining allowlist entry. No logic paths are altered beyond the constant.

No files require special attention.

Important Files Changed

Filename Overview
crates/seal-tui/src/terminal_cap.rs Removes "zed" from MODERN_NAMES, updates doc block with rationale, replaces the old positive-match Zed test with a negative-match test and an allowlist-coverage regression test.
crates/seal-tui/src/chat/runloop.rs Comment-only change: removes "like Zed" from the inline explanation of the TERM_PROGRAM fallback strategy.
crates/seal-utils/src/env.rs Doc comment for term_program() drops Zed from the example terminal list; no logic change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[detect_terminal_capability] --> B{probe_xtversion}
    B -- "Known name in MODERN_NAMES\ne.g. ghostty, kitty, wezterm..." --> C[TerminalCapability::Modern\nsource: Xtversion]
    B -- "No response / unknown name" --> D{probe_term_program\nTERM_PROGRAM env var}
    D -- "Name in MODERN_NAMES\ne.g. iterm.app, foot..." --> E[TerminalCapability::Modern\nsource: TermProgram]
    D -- "Not in list\ne.g. zed, vscode" --> F[None → Unknown]
    F --> G[TerminalCapability::Unknown\ncopy-on-select path]
    C --> H[cmd+c hint\ncopy-on-select OFF]
    E --> H
    G --> I[ctrl+y / auto-copy hint\ncopy-on-select ON]
Loading

Reviews (2): Last reviewed commit: "docs(seal-utils): drop Zed from TERM_PRO..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/seal-tui/src/terminal_cap.rs`:
- Around line 58-63: Update the documentation in the env.rs TERM_PROGRAM
examples to remove "Zed" from the list of modern-terminal examples so it matches
the exclusion described in terminal_cap.rs; locate the TERM_PROGRAM
examples/docstring (the doc comment or constant that lists modern terminals in
crates::seal_utils::env or the function that documents TERM_PROGRAM usage) and
change the examples and explanatory text to explicitly exclude Zed and mirror
the wording used in terminal_cap.rs about Zed relying on alacritty_terminal and
not implementing the kitty keyboard protocol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fb095165-d14a-4793-8cd8-e0f22d6fc024

📥 Commits

Reviewing files that changed from the base of the PR and between c96e21b and ad45cdb.

📒 Files selected for processing (2)
  • crates/seal-tui/src/chat/runloop.rs
  • crates/seal-tui/src/terminal_cap.rs

Comment thread crates/seal-tui/src/terminal_cap.rs
… (SEA-782)

Co-Authored-By: seal <noreply@sealedsecurity.com>
@graphite-app

graphite-app Bot commented Jun 11, 2026

Copy link
Copy Markdown

Merge activity

  • Jun 11, 1:42 AM UTC: mattwilkinsonn added this pull request to the Graphite merge queue.
  • Jun 11, 1:47 AM UTC: CI is running for this pull request on a draft pull request (#510) due to your merge queue CI optimization settings.
  • Jun 11, 1:58 AM UTC: Merged by the Graphite merge queue via draft PR: #510.

@graphite-app graphite-app Bot closed this Jun 11, 2026
@graphite-app graphite-app Bot deleted the sea-782-drop-zed-modern-allowlist--apollo branch June 11, 2026 01:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant