Skip to content

Control sequence again#530

Merged
Kitenite merged 4 commits into
mainfrom
control-sequence-again
Dec 28, 2025
Merged

Control sequence again#530
Kitenite merged 4 commits into
mainfrom
control-sequence-again

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 28, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • Bug Fixes
    • Improved terminal query response handling to be more selective and safer, ensuring only specific response sequences are appropriately suppressed while maintaining compatibility with valid query/response pairs.

✏️ Tip: You can customize this high-level summary in your review settings.

Kitenite and others added 2 commits December 28, 2025 11:11
Add CSI handlers for 'I' (focus in) and 'O' (focus out) sequences
that are sent when focus reporting mode (1004) is enabled by programs
like vim/neovim. These should be suppressed, not displayed as text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add parser hooks to prevent query responses from displaying as text:
- CSI 'I'/'O' - Focus in/out reports (mode 1004)
- OSC 4 - Indexed color palette queries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 28, 2025

Warning

Rate limit exceeded

@Kitenite has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fb0b1d3 and ccb409b.

📒 Files selected for processing (4)
  • .superset/setup.sh
  • .superset/teardown.sh
  • apps/api/src/app/api/integrations/linear/callback/route.ts
  • apps/api/src/app/api/integrations/linear/webhook/route.ts
📝 Walkthrough

Walkthrough

Refined terminal query response suppression logic in a single renderer file. Removed broad suppression of CSI "c" (Device Attributes) and OSC color queries; replaced with targeted handlers for cursor position, focus events, and mode reports. Updated handler registration style to use arrow functions and expanded documentation distinguishing safe vs. unsafe suppression patterns.

Changes

Cohort / File(s) Summary
Terminal Query Response Refinement
apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/suppressQueryResponses.ts
Replaced broad CSI/OSC sequence suppression with targeted handlers: removed DA responses (CSI final "c") and color queries (OSC 10–19); added suppression for cursor position (CSI "R"), focus events (CSI "I"/"O"), and mode reports (CSI "y" with "$" intermediate). Adjusted handler registration to use concise arrow functions. Expanded documentation to classify SAFE vs. unsafe suppression patterns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • filter terminal  #157: Implements filtering/suppression of terminal query responses (cursor/DA/OSC sequences) in alternative code location (terminal-escape-filter.ts and terminal-manager integration), addressing the same suppression feature across different architectural layers.
  • fix(desktop): suppress terminal query responses using xterm.js parser… #196: Modifies the same suppressQueryResponses.ts logic; replaces PTY-level filtering with xterm.js parser hooks, providing broader context for the refined response handling now being targeted by this PR.

Poem

🐰 The Terminal Whispers

A rabbit's paw refines the flow,
Where query-echoes now don't show—
Not all responses must be caught,
Just those that weren't so kindly sought.
The cursor speaks, the focus blinks,
And careful suppression truly links! 🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is entirely empty—only the template structure is present with no actual content filled in for any required sections. Provide a complete description including: a summary of changes, related issues (if any), type of change, testing performed, and any additional notes relevant to the modifications.
Title check ❓ Inconclusive The title 'Control sequence again' is too vague and generic; it lacks specificity about what control sequences are being modified and fails to convey the actual change. Use a more descriptive title that clearly indicates the specific modification, such as 'Refine terminal control sequence suppression to only safe responses' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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.

Kitenite and others added 2 commits December 28, 2025 11:23
Remove handlers that could break terminal functionality:
- CSI 'c' removed (breaks DA queries)
- CSI 't' removed (breaks window commands)
- OSC 4/10-19 removed (breaks color setting)

Keep only response-only sequences where query has different format:
- CSI 'R' (CPR response, query ends in 'n')
- CSI 'I'/'O' (focus reports, no query)
- CSI '$y' (mode report, query ends in '$p')

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Kitenite Kitenite merged commit f075b17 into main Dec 28, 2025
12 checks passed
@Kitenite Kitenite deleted the control-sequence-again branch December 28, 2025 19:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2025

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Fly.io Electric (Fly.io) View App
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

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