Skip to content

feat: add support for Linear desktop app theme injection#5

Merged
Cmochance merged 1 commit into
mainfrom
codex/linear-theme-support
Jun 8, 2026
Merged

feat: add support for Linear desktop app theme injection#5
Cmochance merged 1 commit into
mainfrom
codex/linear-theme-support

Conversation

@Cmochance
Copy link
Copy Markdown
Owner

This PR adds theme injection support for the Linear desktop app, including config settings, CDP targeting rules, CSS templates, and frontend component updates. Tests are added and passing.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8ccf3076d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src-tauri/src/theme.rs
top edge (user wants no dark top bar). Tab labels are native light + carry text-shadow. */
.sc-fqmtlO{background:transparent !important;border:none !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;}
/* hover-detail CARDS (status "Time in status" / sub-issues / labels / project & issue previews)
are one shared component whose surface is `.sx-1lmytr0` — the same base-surface StyleX class
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Escape Linear CSS before putting it in a template literal

选择 Linear 并应用主题时,这段新 CSS 注释里的原始反引号会被原样传给 wrap_injection_css,而该函数用 style.textContent = {css}`` 生成 JavaScript 模板字面量;因此这里的 .sx-1lmytr0 会提前结束模板字符串,导致 Runtime.evaluate/新文档脚本语法错误,Linear 主题不会注入。请在嵌入前转义 CSS 中的反引号(或改用 JSON 字符串编码)。

Useful? React with 👍 / 👎.

@Cmochance Cmochance merged commit 497e27f into main Jun 8, 2026
2 checks passed
@Cmochance Cmochance deleted the codex/linear-theme-support branch June 8, 2026 06:23
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

Comment thread src-tauri/src/config.rs
match self {
AgentKind::Codex => vec!["Codex"],
AgentKind::Antigravity => vec!["Antigravity"],
AgentKind::Linear => vec!["Linear"],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Process name pattern "Linear" causes false-positive process detection

The process_name_patterns() for AgentKind::Linear returns vec!["Linear"], which is a common English word substring. In agent.rs:27, is_agent_process_running uses pname.contains(p) with an OR against the exe path check (agent.rs:35), so any process whose name contains "Linear" (e.g. "LinearMouse" — a popular macOS mouse utility) would make the function return true even when the actual Linear app isn't running. Unlike "Codex" or "Antigravity" which are distinctive names, "Linear" is a common substring. This causes get_agent_status (lib.rs:81) to report "running": true when Linear isn't actually running, confusing users with a "Running" + "No debug port" status. The kill/restart flow is safe (it uses is_agent_bundle_process_running which checks the full exe path), so this is limited to misleading UI status.

Prompt for agents
The process_name_patterns() for Linear returns vec!["Linear"], but "Linear" is a common substring that matches other macOS apps like LinearMouse. The is_agent_process_running function in agent.rs:20-39 uses contains() with an OR condition (name_match || exe_match), so any process with "Linear" in its name triggers a false positive.

Two possible fixes:
1. Make the name pattern more specific, e.g. use an exact match instead of contains(). Change agent.rs:27 to use pname == p or pname.starts_with(p) rather than pname.contains(p). However, this would also affect Codex/Antigravity matching.
2. Change the logic in is_agent_process_running to require BOTH name_match AND exe_match for the Linear agent (or use AND instead of OR globally — but that might break detection for cases where the exe path isn't available).
3. Another option: for Linear specifically, only rely on binary_path_patterns (exe_match) and not process_name_patterns. This could be done by returning an empty vec for process_name_patterns for Linear, or by refining the detection logic to require exe_match when available.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant