Skip to content

fix(desktop): keep OS clipboard chords (Cmd+C/V/X/A) bubbling out of v1 terminal - #3407

Closed
AytuncYildizli wants to merge 3 commits into
ParadevAI:mainfrom
AytuncYildizli:fix/v1-terminal-clipboard-bubble
Closed

AytuncYildizli wants to merge 3 commits into
ParadevAI:mainfrom
AytuncYildizli:fix/v1-terminal-clipboard-bubble

Conversation

@AytuncYildizli

@AytuncYildizli AytuncYildizli commented Apr 13, 2026 •

Copy link
Copy Markdown

Summary / What changed

  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts: short-circuit OS clipboard chords (Cmd+C/V/X/A on macOS, Ctrl+Shift+C/V/X/A and Shift+Insert / Ctrl+Insert on other platforms) so they bubble out of the terminal handler instead of falling through to the PTY.

Why

#3390 made the v1 terminal forward any chord not registered as an app hotkey to the PTY. That fixed Claude Code TUI shortcuts but regressed standard OS clipboard combos: Cmd+C, Cmd+V, Cmd+X, Cmd+A are not registered as app hotkeys, so they now go straight to xterm and never reach Electron's edit menu / xterm.js Selection. Result: text selected in the terminal pane can't be copied; clipboard paste also doesn't reach the input line.

The patch adds an explicit allow-bubble step before the "fall through to PTY" branch. Terminal-reserved chords (Ctrl+C SIGINT, Ctrl+D EOF, etc.) are still handled earlier in the same function, so PTY semantics are unchanged.

Tests

No unit tests touched — the change is platform-conditional event routing inside the live keyboard handler. Manual repro was decisive enough.

Real-world validation

  • Reproduced on Superset Desktop v1.5.1 (macOS, Apple Silicon, Turkish keyboard layout). Before: select text in a terminal pane, press Cmd+C, nothing happens; Cmd+V does nothing. After: selection copies to the system clipboard; paste reaches the PTY input line as expected.
  • Verified Ctrl+C in PTY still sends SIGINT (terminal-reserved path runs first).

Issue

Regression of #3390. No standalone issue yet — happy to file one if maintainers prefer that flow.


Summary by cubic

Fixes the v1 terminal swallowing OS clipboard shortcuts so they bubble to the host, restoring copy, paste, cut, and select-all in terminal panes; PTY-reserved chords are unchanged. Also seeds observability blueprint docs and a triage runbook.

  • Bug Fixes
    • Bubble OS clipboard chords: macOS Cmd+C/V/X/A; Linux/Windows Ctrl+Shift+C/V/X/A, Ctrl+Insert (copy), Shift+Insert (paste). Adds explicit Insert handling and excludes Ctrl+Delete/Shift+Delete so readline edits reach the PTY.
    • Addresses regression from fix(desktop): forward unregistered ctrl/meta chords to v1 terminal PTY #3390 where unregistered chords fell through to the PTY and bypassed Electron/xterm selection.

Written for commit 6d65367. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Updated terminal keyboard handling to let standard OS clipboard shortcuts (copy, paste, cut, select-all) pass through correctly on macOS and Windows/Linux.
    • Restored platform-appropriate clipboard keys (Ctrl+Insert / Shift+Insert on Windows/Linux) while keeping delete-related shortcuts routed to the terminal.
  • Documentation

    • Added observability system documentation, including event taxonomy, journey definitions, field registry, and query reference.
  • Runbooks

    • Introduced an observability triage runbook for diagnosing missing telemetry data.

…v1 terminal

ParadevAI#3390 changed the v1 terminal keyboard handler so any chord not registered
as an app hotkey falls through to the PTY. That regressed standard OS
clipboard shortcuts: Cmd+C / Cmd+V / Cmd+X / Cmd+A on macOS and the
Linux/Windows equivalents (Ctrl+Shift+C/V/X/A, Shift+Insert) are not
registered as app hotkeys, so they now reach xterm and never get a chance
to copy/paste via Electron's edit menu — text selection in the terminal
became impossible to copy.

Add an explicit short-circuit before the "fall through to PTY" branch:
when the chord is exactly an OS clipboard combination, return false so the
event bubbles to the host. xterm.js' selection / Electron's edit role still
get to do the work; SIGINT (Ctrl+C in PTY) and other terminal-reserved
chords are unaffected because they're handled earlier in the same handler.

Reproduced on Superset Desktop v1.5.1 (macOS, Apple Silicon, Turkish
keyboard): Cmd+C in terminal pane silently dropped before this patch,
copies selection after.
@coderabbitai

coderabbitai Bot commented Apr 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Added observability system documentation establishing required telemetry contracts, field registry, event taxonomy, journey definitions, query reference, and operational triage procedures across six new documentation files.

Changes

Observability System Documentation

Layer / File(s) Summary
System Overview & Minimum Contract
docs/observability/system-overview.md
System-level framework defining required correlation identifiers, signal types, privacy constraints, and operational separation of health/readiness checks. Marks directory as "RED" pending real helpers/tests/wiring.
Field Registry & Event Taxonomy
docs/observability/field-registry.md, docs/observability/event-taxonomy.md
Field/type matrix specifying which observability fields are emitted via headers, logs, spans, and metric labels, plus data-governance redaction rules. Journey event enumeration with required and forbidden field constraints.
Journey Definitions & Query Patterns
docs/observability/journeys.md, docs/observability/query-reference.md
Three journey sections (J1–J3) defining user chat, provider call, and session recovery lifecycle stages with required signals. Canonical label taxonomy, baseline metrics, missing-data interpretation, and "false query trap" anti-patterns.
Operational Triage Runbook
ops/runbooks/observability-triage.md
Initial health/readiness checklist, metric/log/trace verification, privacy guard against raw log pasting, and SEV1–SEV4 escalation definitions for missing observability data incidents.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Traces and fields in order aligned,
A tapestry of signals, thoughtfully designed,
Journeys and queries mapped with care,
Telemetry flowing, transparent and fair,
One rabbit whispers: observe and share! 🌟📊

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: restoring OS clipboard shortcuts (Cmd+C/V/X/A) in the v1 terminal by allowing them to bubble out rather than being consumed by the PTY.
Description check ✅ Passed The description covers all required template sections: clear explanation of what changed and why, links to related issue (#3390), identifies type as bug fix, describes testing approach (manual validation), and provides additional context about the fix.
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 unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix/v1-terminal-clipboard-bubble

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a regression from #3390 where OS clipboard chords (Cmd+C/V/X/A on macOS, Ctrl+Shift+C/V/X/A and Ctrl+Insert on Linux/Windows) were being swallowed by the v1 terminal's keyboard handler and sent to the PTY instead of bubbling out to Electron/xterm's selection layer. The fix adds an explicit allow-bubble check for these chords before the "everything-else → PTY" fallthrough that #3390 introduced.

Key changes:

  • setupKeyboardHandler in helpers.ts: inserts a new block after isTerminalReservedEvent / CLEAR_TERMINAL checks that returns false (bubble) for macOS Cmd+C/V/X/A and for Linux/Windows Ctrl+Shift+C/V/X/A / Ctrl+Insert.

Issues found:

  • Shift+Insert (standard Linux/Windows paste shortcut) is listed in both the inline comment and the PR description as a fixed case, but the outer guard requires ctrlKey to be pressed, which Shift+Insert never satisfies. The shortcut still falls through to the PTY.
  • Ctrl+Delete is included alongside Ctrl+Insert in the onlyCtrl bubble branch, but it is a terminal editing shortcut ("delete forward word"), not a clipboard chord — bubbling it regresses forward-word-delete on non-Mac platforms.

Confidence Score: 3/5

Safe to merge for macOS users, but non-Mac clipboard handling has two concrete bugs that leave the fix incomplete on Linux/Windows.

The macOS path (Cmd+C/V/X/A) is correctly implemented and solves the primary regression. However, the non-Mac path has two P1 issues: Shift+Insert paste is documented as fixed but the outer guard never matches it, and Ctrl+Delete is incorrectly bubbled — it is a terminal delete-forward-word shortcut causing a new PTY editing regression on Linux/Windows.

apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts — specifically the non-Mac clipboard chord block (lines 611–628)

Important Files Changed

Filename Overview
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts Adds OS clipboard chord allow-bubbling in setupKeyboardHandler; macOS path is correct, but non-Mac path has two issues: Shift+Insert (paste) is mentioned in the comment but the outer guard never matches it, and Ctrl+Delete is incorrectly included (it is a terminal "delete forward word" shortcut, not a clipboard chord).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[KeyboardEvent in xterm handler] --> B{isShiftEnter?}
    B -- yes --> C[handle / return false]
    B -- no --> D{isCmdBackspace/Left/Right or Option/Ctrl nav?}
    D -- yes --> E[handle nav / return false]
    D -- no --> F{isTerminalReservedEvent? Ctrl+C/D/Z/S/Q}
    F -- yes --> G[return true to PTY]
    F -- no --> H{matches CLEAR_TERMINAL?}
    H -- yes --> I[call onClear / return false]
    H -- no --> J{isMac and onlyMeta and C/V/X/A?}
    J -- yes --> K[return false OS clipboard bubbles]
    J -- no --> L{not isMac and onlyCtrl or ctrlShiftOnly?}
    L -- Ctrl+Shift+C/V/X/A --> M[return false OS clipboard bubbles]
    L -- onlyCtrl+Insert --> N[return false Ctrl+Insert Copy]
    L -- onlyCtrl+Delete --> O[BUG: return false breaks delete-fwd-word]
    L -- Shift+Insert shiftOnly --> P[outer guard never entered falls to PTY]
    L -- no match --> Q{resolveHotkeyFromEvent not null?}
    Q -- registered hotkey --> R[return false bubble]
    Q -- unregistered --> S[return true PTY]
Loading

Reviews (1): Last reviewed commit: "fix(desktop): keep OS clipboard chords (..." | Re-trigger Greptile

Comment on lines +623 to +627
onlyCtrl &&
(event.code === "Insert" || event.code === "Delete")
) {
return false;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Ctrl+Delete is a terminal editing shortcut, not a clipboard chord

Ctrl+Delete in terminal contexts sends a "delete forward word" escape sequence (e.g. \e[3;5~ in many shells/readline configs). Making it bubble (return false) prevents that sequence from reaching the PTY, regressing forward-word-delete for non-Mac users.

The standard CUA clipboard shortcuts that warrant bubbling are:

  • Copy: Ctrl+Insert ✓
  • Paste: Shift+Insert (currently missing, see sibling comment)
  • Cut: Shift+Delete (separate shiftOnly case)

Ctrl+Delete is not part of that set and should be removed from this condition:

Suggested change
onlyCtrl &&
(event.code === "Insert" || event.code === "Delete")
) {
return false;
}
if (
onlyCtrl &&
event.code === "Insert"
) {
return false;
}

Comment on lines +611 to +628
if (!isMac && (onlyCtrl || ctrlShiftOnly)) {
// Linux/Windows: Ctrl+Shift+C/V/X/A or Shift+Insert / Ctrl+Insert
if (
ctrlShiftOnly &&
(event.code === "KeyC" ||
event.code === "KeyV" ||
event.code === "KeyX" ||
event.code === "KeyA")
) {
return false;
}
if (
onlyCtrl &&
(event.code === "Insert" || event.code === "Delete")
) {
return false;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Shift+Insert mentioned in comment but never enters the bubble block

The inline comment on line 612 and the PR description both list Shift+Insert (the Linux/Windows paste shortcut) as a case that should bubble. However, the outer guard if (!isMac && (onlyCtrl || ctrlShiftOnly)) requires ctrlKey to be set. For Shift+Insert, only shiftKey is pressed with no ctrlKey, so neither onlyCtrl nor ctrlShiftOnly is ever true — the block is never entered and Shift+Insert still falls through to the PTY path unchanged.

A shiftOnly variable (analogous to onlyCtrl) should be added to the outer condition, and Shift+Insert should be handled inside:

const shiftOnly =
  event.shiftKey && !event.ctrlKey && !event.metaKey && !event.altKey;
if (!isMac && (onlyCtrl || ctrlShiftOnly || shiftOnly)) {
  // Ctrl+Shift+C/V/X/A
  if (ctrlShiftOnly && (event.code === "KeyC" || event.code === "KeyV" ||
      event.code === "KeyX" || event.code === "KeyA")) {
    return false;
  }
  // Ctrl+Insert = Copy
  if (onlyCtrl && event.code === "Insert") { return false; }
  // Shift+Insert = Paste
  if (shiftOnly && event.code === "Insert") { return false; }
}

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts`:
- Around line 611-627: The current modifier checks use onlyCtrl for
Insert/Delete which incorrectly prevents Shift+Insert from being handled and
allows Ctrl+Delete to bubble; update the condition so Insert/Delete are gated by
the Shift-only modifier instead of Ctrl (replace the onlyCtrl check with the
shift-only variable used in this keyboard handler, e.g., shiftOnly or onlyShift)
so the code becomes: if (shiftOnly && (event.code === "Insert" || event.code ===
"Delete")) return false; thereby mapping Shift+Insert/Shift+Delete to the
terminal clipboard/cut behavior and preventing Ctrl+Delete from being swallowed.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49b3a373-2400-4d92-bd71-d62f5c1e6e03

📥 Commits

Reviewing files that changed from the base of the PR and between 102633c and c145940.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts

Comment on lines +611 to +627
if (!isMac && (onlyCtrl || ctrlShiftOnly)) {
// Linux/Windows: Ctrl+Shift+C/V/X/A or Shift+Insert / Ctrl+Insert
if (
ctrlShiftOnly &&
(event.code === "KeyC" ||
event.code === "KeyV" ||
event.code === "KeyX" ||
event.code === "KeyA")
) {
return false;
}
if (
onlyCtrl &&
(event.code === "Insert" || event.code === "Delete")
) {
return false;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix the non-mac Insert/Delete modifier mapping.

Line 611 excludes Shift+Insert, so that documented paste chord still reaches the PTY. Lines 622-625 also bubble Ctrl+Delete, which is a common terminal editing chord rather than a clipboard shortcut. If you want the Delete-based cut path too, that modifier should be Shift, not Ctrl.

🔧 Proposed fix
 		const onlyMeta =
 			event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey;
 		const onlyCtrl =
 			event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey;
+		const onlyShift =
+			event.shiftKey && !event.metaKey && !event.ctrlKey && !event.altKey;
 		const ctrlShiftOnly =
 			event.ctrlKey && event.shiftKey && !event.metaKey && !event.altKey;
@@
-		if (!isMac && (onlyCtrl || ctrlShiftOnly)) {
+		if (!isMac && (onlyCtrl || onlyShift || ctrlShiftOnly)) {
 			// Linux/Windows: Ctrl+Shift+C/V/X/A or Shift+Insert / Ctrl+Insert
 			if (
 				ctrlShiftOnly &&
 				(event.code === "KeyC" ||
 					event.code === "KeyV" ||
 					event.code === "KeyX" ||
 					event.code === "KeyA")
 			) {
 				return false;
 			}
-			if (
-				onlyCtrl &&
-				(event.code === "Insert" || event.code === "Delete")
-			) {
+			if (onlyCtrl && event.code === "Insert") {
+				return false;
+			}
+			if (onlyShift && event.code === "Insert") {
 				return false;
 			}
 		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (!isMac && (onlyCtrl || ctrlShiftOnly)) {
// Linux/Windows: Ctrl+Shift+C/V/X/A or Shift+Insert / Ctrl+Insert
if (
ctrlShiftOnly &&
(event.code === "KeyC" ||
event.code === "KeyV" ||
event.code === "KeyX" ||
event.code === "KeyA")
) {
return false;
}
if (
onlyCtrl &&
(event.code === "Insert" || event.code === "Delete")
) {
return false;
}
if (!isMac && (onlyCtrl || onlyShift || ctrlShiftOnly)) {
// Linux/Windows: Ctrl+Shift+C/V/X/A or Shift+Insert / Ctrl+Insert
if (
ctrlShiftOnly &&
(event.code === "KeyC" ||
event.code === "KeyV" ||
event.code === "KeyX" ||
event.code === "KeyA")
) {
return false;
}
if (onlyCtrl && event.code === "Insert") {
return false;
}
if (onlyShift && event.code === "Insert") {
return false;
}
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts`
around lines 611 - 627, The current modifier checks use onlyCtrl for
Insert/Delete which incorrectly prevents Shift+Insert from being handled and
allows Ctrl+Delete to bubble; update the condition so Insert/Delete are gated by
the Shift-only modifier instead of Ctrl (replace the onlyCtrl check with the
shift-only variable used in this keyboard handler, e.g., shiftOnly or onlyShift)
so the code becomes: if (shiftOnly && (event.code === "Insert" || event.code ===
"Delete")) return false; thereby mapping Shift+Insert/Shift+Delete to the
terminal clipboard/cut behavior and preventing Ctrl+Delete from being swallowed.

Review feedback on ParadevAI#3407 (Greptile P1 + CodeRabbit major):
- Ctrl+Delete is a shell readline chord (delete-word-forward), not a
  clipboard shortcut. Removed it from the bubble path so it reaches the
  PTY again.
- Shift+Insert is the documented Linux paste chord but the previous
  `onlyCtrl` guard excluded shift, so it never matched. Added an explicit
  Insert + (onlyCtrl || onlyShift) path that covers Ctrl+Insert (copy) and
  Shift+Insert (paste). Shift+Delete is intentionally excluded — terminals
  usually consume it as a readline edit, not as cut.
@AytuncYildizli

Copy link
Copy Markdown
Author

thanks @greptile-apps and @coderabbitai — both findings were valid. fixed in 9a2b3fa:

  • removed Ctrl+Delete from the bubble path; it's a shell readline chord (delete-word-forward), not clipboard.
  • added explicit Insert + (onlyCtrl || onlyShift) so Shift+Insert (paste) actually matches now. Ctrl+Insert (copy) still works.
  • left Shift+Delete out — terminals usually consume it as a readline edit, ambiguous as cut.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@AytuncYildizli Thanks for the detailed follow-up! The three decisions all look well-reasoned:

  • Ctrl+Delete removal — correct call; it's kill-word in readline/zsh/bash and shouldn't escape to the host.
  • Insert + (onlyCtrl || onlyShift) guard — the explicit key check is the right fix; relying on modifier-only flags without pinning the key was the root of the Shift+Insert miss.
  • Shift+Delete exclusion — reasonable given the ambiguity; terminals like xterm traditionally map it to a cut-to-clipboard operation, but readline also uses it as delete-char, so leaving it terminal-side avoids surprising PTY behaviour.

The clipboard bubble path looks solid now.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@greptile-apps

greptile-apps Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

The fix looks correct. The relevant block now reads:

if (event.code === "Insert" && (onlyCtrl || onlyShift)) {
    return false;
}

All three points check out:

  • Ctrl+Delete is gone from the bubble path — shells get delete-word-forward as expected.
  • Shift+Insert now matches via onlyShift (the previous onlyCtrl-only guard was the bug).
  • Shift+Delete is intentionally absent — the ambiguity reasoning is sound (readline kill-region vs. cut semantics vary by emulator).

The onlyShift flag is also correctly defined as shiftKey && !ctrlKey && !metaKey && !altKey, so there's no accidental overlap with Ctrl+Shift+Insert or similar chords. LGTM.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules and .greptile/config.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts">

<violation number="1" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts:611">
P2: `Shift+Insert` (standard Linux/Windows paste shortcut) is documented in the comment on line 612 and the PR description as a chord that should bubble, but the outer guard `if (!isMac && (onlyCtrl || ctrlShiftOnly))` requires `ctrlKey` to be set. For `Shift+Insert`, only `shiftKey` is pressed, so neither `onlyCtrl` nor `ctrlShiftOnly` is true — the block is never entered and `Shift+Insert` still falls through to the PTY. Add a `shiftOnly` modifier variable and include it in the outer condition.</violation>

<violation number="2" location="apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/helpers.ts:624">
P2: `Ctrl+Delete` is a terminal editing shortcut (forward-word-delete, typically sends `\e[3;5~`), not a clipboard chord. Bubbling it out of the terminal handler breaks forward-word-delete for Linux/Windows users. The standard CUA clipboard shortcuts using these keys are `Ctrl+Insert` (copy) and `Shift+Insert` (paste) — `Ctrl+Delete` is not in that set. Remove `event.code === "Delete"` from this condition.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@Kitenite

Copy link
Copy Markdown
Member

Follow-up note: PR #3415 now exists to handle the broader terminal shortcut cases around this same area.

It tightens the platform guard so Linux fallback chords do not leak onto macOS, and aligns the v1 terminal behavior more closely with VS Code's terminal clipboard handling, including macOS Cmd+A select-all and boundary coverage for the non-clipboard PTY cases.

Link: #3415

@Kitenite

Copy link
Copy Markdown
Member

Thank you for reporting a fixing!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/observability/query-reference.md (2)

26-28: Expand missing-data taxonomy with concrete examples.

The taxonomy ("no traffic, no failures, broken exporter…") is useful but generic. Consider adding:

  • How to distinguish between "no traffic" vs. "broken exporter" (e.g., check exporter logs, verify datasource connectivity).
  • Common deployment/ingestion delays (SLO expectations, cache TTLs).
  • Specific label mismatches to watch for (e.g., typos in environment or surface values).
🤖 Prompt for 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.

In `@docs/observability/query-reference.md` around lines 26 - 28, Expand the
Missing-data taxonomy section to provide actionable diagnostic guidance
alongside the current list of possible causes. Add specific troubleshooting
steps to help users distinguish between similar scenarios, such as how to check
exporter logs and verify datasource connectivity to differentiate "no traffic"
from "broken exporter". Include information about common deployment and
ingestion delay expectations (SLO timeframes and cache TTL values).
Additionally, add examples of specific label mismatches that commonly cause
issues, particularly typos in field names like "environment" or "surface" values
that users should watch for when debugging empty dashboards.

3-3: Clarify what "initial repo contract" means and define completion criteria.

The status line marks this as an "initial" contract awaiting datasource names, but does not say:

  • Who is responsible for filling in datasource names (Grafana/OTel/PostHog/Sentry wiring)?
  • What is the timeline or blocking condition for finalization?
  • How will users know when the document is actionable?

Tighten the status message to be specific (e.g., "Awaiting Grafana/OTel wiring landing (tracked in issue #XYZ)") or move this blocking work to a separate ADR/tracking issue.

🤖 Prompt for 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.

In `@docs/observability/query-reference.md` at line 3, The status message at the
beginning of the query-reference.md file uses vague language ("initial repo
contract") without clarifying who is responsible for completing the work or what
the timeline is. Replace this status line with specific, actionable language
that either: identifies the exact blocking dependencies with linked issue
references (e.g., "Awaiting completion of Grafana/OTel wiring, tracked in issue
`#XYZ`"), or move the blocking work description to a separate tracking issue or
ADR document so the status line simply reflects the document's current state.
This will make it clear to users whether the document is usable and who to
contact for updates.
🤖 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.

Nitpick comments:
In `@docs/observability/query-reference.md`:
- Around line 26-28: Expand the Missing-data taxonomy section to provide
actionable diagnostic guidance alongside the current list of possible causes.
Add specific troubleshooting steps to help users distinguish between similar
scenarios, such as how to check exporter logs and verify datasource connectivity
to differentiate "no traffic" from "broken exporter". Include information about
common deployment and ingestion delay expectations (SLO timeframes and cache TTL
values). Additionally, add examples of specific label mismatches that commonly
cause issues, particularly typos in field names like "environment" or "surface"
values that users should watch for when debugging empty dashboards.
- Line 3: The status message at the beginning of the query-reference.md file
uses vague language ("initial repo contract") without clarifying who is
responsible for completing the work or what the timeline is. Replace this status
line with specific, actionable language that either: identifies the exact
blocking dependencies with linked issue references (e.g., "Awaiting completion
of Grafana/OTel wiring, tracked in issue `#XYZ`"), or move the blocking work
description to a separate tracking issue or ADR document so the status line
simply reflects the document's current state. This will make it clear to users
whether the document is usable and who to contact for updates.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 48903103-f41e-48f8-bb1d-fb0d5f0cf4f2

📥 Commits

Reviewing files that changed from the base of the PR and between 9a2b3fa and 6d65367.

📒 Files selected for processing (6)
  • docs/observability/event-taxonomy.md
  • docs/observability/field-registry.md
  • docs/observability/journeys.md
  • docs/observability/query-reference.md
  • docs/observability/system-overview.md
  • ops/runbooks/observability-triage.md
✅ Files skipped from review due to trivial changes (5)
  • ops/runbooks/observability-triage.md
  • docs/observability/journeys.md
  • docs/observability/event-taxonomy.md
  • docs/observability/field-registry.md
  • docs/observability/system-overview.md

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

4 issues found across 6 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/observability/field-registry.md">

<violation number="1" location="docs/observability/field-registry.md:9">
P2: The `span_id` row maps the field directly to the `traceparent` header without clarifying that the header's `parent-id` is the caller's span (parent span) on ingress and the current span only on egress. This can cause implementers to use the wrong span ID for local spans, breaking trace/span correlation.</violation>
</file>

<file name="docs/observability/system-overview.md">

<violation number="1" location="docs/observability/system-overview.md:5">
P2: Machine-specific absolute local path with username is committed in shared documentation. Replace `/Users/aytuncyildizli/superset` with a generic representation such as the repo root, a relative path, or the Git URL so the doc is accurate and portable across contributors and environments.</violation>
</file>

<file name="docs/observability/query-reference.md">

<violation number="1" location="docs/observability/query-reference.md:1">
P2: Unrelated observability documentation file added inside a focused desktop clipboard bugfix PR. This couples a docs contract change to a bugfix, increasing review/rollback risk and violating the team's keep-PRs-focused guidance.</violation>
</file>

<file name="docs/observability/event-taxonomy.md">

<violation number="1" location="docs/observability/event-taxonomy.md:10">
P2: Completion and failure journey events should require the same `environment` and `app_version` dimensions as the start event, or the document should explicitly state that the typed proxy auto-enriches them. Otherwise the taxonomy cannot support consistent end-to-end observability slicing (e.g., failure rates by version or environment).</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

| --- | --- | --- | --- | --- | --- | --- |
| `request_id` | generated id | yes | yes | yes | no | One HTTP/IPC/job operation. |
| `trace_id` | W3C trace id | `traceparent` | yes | native | no | Full journey trace. |
| `span_id` | W3C span id | `traceparent` | yes | native | no | Current operation span. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: The span_id row maps the field directly to the traceparent header without clarifying that the header's parent-id is the caller's span (parent span) on ingress and the current span only on egress. This can cause implementers to use the wrong span ID for local spans, breaking trace/span correlation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/observability/field-registry.md, line 9:

<comment>The `span_id` row maps the field directly to the `traceparent` header without clarifying that the header's `parent-id` is the caller's span (parent span) on ingress and the current span only on egress. This can cause implementers to use the wrong span ID for local spans, breaking trace/span correlation.</comment>

<file context>
@@ -0,0 +1,25 @@
+| --- | --- | --- | --- | --- | --- | --- |
+| `request_id` | generated id | yes | yes | yes | no | One HTTP/IPC/job operation. |
+| `trace_id` | W3C trace id | `traceparent` | yes | native | no | Full journey trace. |
+| `span_id` | W3C span id | `traceparent` | yes | native | no | Current operation span. |
+| `correlation_id` | generated id | yes | yes | yes | no | One business action/retry chain. |
+| `actor_id` | hashed/pseudonymous id | yes | yes | yes | no | Never raw email/phone/customer id. |
</file context>
Suggested change
| `span_id` | W3C span id | `traceparent` | yes | native | no | Current operation span. |
| `span_id` | W3C span id | `traceparent` | yes | native | no | Current operation span. Inbound `traceparent.parent-id` is the parent span; the current span ID is generated locally and becomes `parent-id` in outbound `traceparent`. |


Blueprint source: company-wide `observability-blueprint.md`. Vendor stack can vary; principle IDs do not.

Repo: `/Users/aytuncyildizli/superset`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Machine-specific absolute local path with username is committed in shared documentation. Replace /Users/aytuncyildizli/superset with a generic representation such as the repo root, a relative path, or the Git URL so the doc is accurate and portable across contributors and environments.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/observability/system-overview.md, line 5:

<comment>Machine-specific absolute local path with username is committed in shared documentation. Replace `/Users/aytuncyildizli/superset` with a generic representation such as the repo root, a relative path, or the Git URL so the doc is accurate and portable across contributors and environments.</comment>

<file context>
@@ -0,0 +1,17 @@
+
+Blueprint source: company-wide `observability-blueprint.md`. Vendor stack can vary; principle IDs do not.
+
+Repo: `/Users/aytuncyildizli/superset`
+Surface: agent/desktop/web app surface
+
</file context>

@@ -0,0 +1,34 @@
# Observability Query Reference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Unrelated observability documentation file added inside a focused desktop clipboard bugfix PR. This couples a docs contract change to a bugfix, increasing review/rollback risk and violating the team's keep-PRs-focused guidance.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/observability/query-reference.md, line 1:

<comment>Unrelated observability documentation file added inside a focused desktop clipboard bugfix PR. This couples a docs contract change to a bugfix, increasing review/rollback risk and violating the team's keep-PRs-focused guidance.</comment>

<file context>
@@ -0,0 +1,34 @@
+# Observability Query Reference
+
+Status: initial repo contract. Fill datasource names when Grafana/OTel/PostHog/Sentry wiring lands.
</file context>

| Event | Journey | When | Required fields | Forbidden fields |
| --- | --- | --- | --- | --- |
| `superset.journey_started` | TBD | User/system intent accepted | `correlation_id`, `surface`, `environment`, `app_version` | raw content, token, email, phone |
| `superset.journey_completed` | TBD | Business success confirmed | `correlation_id`, `result`, `success` | raw content, token, email, phone |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Completion and failure journey events should require the same environment and app_version dimensions as the start event, or the document should explicitly state that the typed proxy auto-enriches them. Otherwise the taxonomy cannot support consistent end-to-end observability slicing (e.g., failure rates by version or environment).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/observability/event-taxonomy.md, line 10:

<comment>Completion and failure journey events should require the same `environment` and `app_version` dimensions as the start event, or the document should explicitly state that the typed proxy auto-enriches them. Otherwise the taxonomy cannot support consistent end-to-end observability slicing (e.g., failure rates by version or environment).</comment>

<file context>
@@ -0,0 +1,11 @@
+| Event | Journey | When | Required fields | Forbidden fields |
+| --- | --- | --- | --- | --- |
+| `superset.journey_started` | TBD | User/system intent accepted | `correlation_id`, `surface`, `environment`, `app_version` | raw content, token, email, phone |
+| `superset.journey_completed` | TBD | Business success confirmed | `correlation_id`, `result`, `success` | raw content, token, email, phone |
+| `superset.journey_failed` | TBD | Bounded failure class known | `correlation_id`, `error_class`, `success` | raw error message as label |
</file context>

@Kitenite

Copy link
Copy Markdown
Member

Closing: this only touches the legacy v1 UI (screens/main), which is being retired. only v1 Terminal helpers.ts; v2 has clipboard-shortcuts.ts (#3968). If the bug still shows in the v2 workspace, please open an issue.

@Kitenite Kitenite closed this Aug 22, 2026
@Kitenite

Copy link
Copy Markdown
Member

Thank you for digging into the clipboard chords, and for the careful event.code work in the sibling PR. The v1 terminal is on its way out, which is the only reason this isn't landing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants