Skip to content

Conversation

@sawka
Copy link
Member

@sawka sawka commented Jan 2, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 2, 2026

Walkthrough

This pull request removes terminal-based RPC client initialization and related terminal lifecycle code across multiple components. It deletes test UI components Page and Button, removes Wave OSC 9283 handling from the frontend terminal wrapper, eliminates WebSocket/proxy wiring and related OSC-to-shell forwarding in the shell controller, drops terminal raw-mode and signal handlers from wshutil, and changes wsh command setup to return an error when WAVETERM_JWT is missing instead of initializing a fallback terminal client. Packet-based RPC setup remains.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No pull request description was provided by the author. While a description would be helpful, the absence of one is not grounds for failure given the clear and specific title that explains the changes. Consider adding a description explaining the motivation for removing these OSC handlers and any impact on terminal functionality or shell communication.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: removal of OSC 9283 handler is confirmed in termwrap.ts, and removal of OSC 23198-related functionality (terminal RPC setup and signal handling) is confirmed across multiple files including wshutil.go and wshcmd-root.go.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9180421 and 87f2ae8.

📒 Files selected for processing (1)
  • frontend/app/view/term/termwrap.ts
💤 Files with no reviewable changes (1)
  • frontend/app/view/term/termwrap.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build for TestDriver.ai
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
cmd/test/test-main.go (1)

6-8: Consider removing this file entirely.

The empty main() function makes this test binary a no-op. If the test components (Page, Button) and terminal-based test infrastructure are no longer needed, consider deleting cmd/test/test-main.go entirely rather than maintaining an empty placeholder.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e671242 and 9180421.

📒 Files selected for processing (5)
  • cmd/test/test-main.go
  • cmd/wsh/cmd/wshcmd-root.go
  • frontend/app/view/term/termwrap.ts
  • pkg/blockcontroller/shellcontroller.go
  • pkg/wshutil/wshutil.go
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-01-22T01:28:41.417Z
Learnt from: esimkowitz
Repo: wavetermdev/waveterm PR: 1790
File: pkg/remote/fileshare/wshfs/wshfs.go:122-122
Timestamp: 2025-01-22T01:28:41.417Z
Learning: The RpcClient in pkg/remote/fileshare/wshfs/wshfs.go is initialized and handled downstream by either main-server or wshcmd-connserver, as documented in the package comment.

Applied to files:

  • cmd/wsh/cmd/wshcmd-root.go
  • pkg/blockcontroller/shellcontroller.go
  • pkg/wshutil/wshutil.go
📚 Learning: 2025-01-29T04:21:11.649Z
Learnt from: esimkowitz
Repo: wavetermdev/waveterm PR: 1725
File: pkg/remote/fileshare/wavefs/wavefs.go:441-494
Timestamp: 2025-01-29T04:21:11.649Z
Learning: The `CopyRemote` function in WaveTerm's file operations has proper error handling that prevents partial writes by failing fast and using context cancellation. Each step (path cleaning, file operations, tar reading/writing) is guarded by error checks that prevent proceeding with writes on error.

Applied to files:

  • cmd/wsh/cmd/wshcmd-root.go
📚 Learning: 2025-10-15T03:21:02.229Z
Learnt from: sawka
Repo: wavetermdev/waveterm PR: 2433
File: pkg/aiusechat/tools_readfile.go:197-197
Timestamp: 2025-10-15T03:21:02.229Z
Learning: In Wave Terminal's AI tool definitions (pkg/aiusechat/tools_*.go), the Description field should not mention approval requirements even when ToolApproval returns ApprovalNeedsApproval. This prevents the LLM from asking users for approval before calling the tool, avoiding redundant double-approval prompts since the runtime will enforce approval anyway.

Applied to files:

  • cmd/wsh/cmd/wshcmd-root.go
📚 Learning: 2025-11-01T00:57:23.025Z
Learnt from: sawka
Repo: wavetermdev/waveterm PR: 2504
File: frontend/app/aipanel/aipanel-contextmenu.ts:15-16
Timestamp: 2025-11-01T00:57:23.025Z
Learning: In the waveterm codebase, types defined in custom.d.ts are globally available and do not require explicit imports. Backend types defined in gotypes.d.ts are also globally available.

Applied to files:

  • frontend/app/view/term/termwrap.ts
📚 Learning: 2025-01-22T22:27:25.739Z
Learnt from: esimkowitz
Repo: wavetermdev/waveterm PR: 1790
File: pkg/remote/connparse/connparse.go:76-82
Timestamp: 2025-01-22T22:27:25.739Z
Learning: The GetRpcContext() method in wshutil package is guaranteed to never return nil due to type constraints, making nil checks unnecessary.

Applied to files:

  • pkg/wshutil/wshutil.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Build for TestDriver.ai
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (4)
cmd/wsh/cmd/wshcmd-root.go (1)

84-94: LGTM - Improved session validation.

The explicit error when WAVETERM_JWT is missing correctly enforces Wave-managed sessions, replacing the previous silent fallback to terminal-based RPC. This tightens security and aligns with the PR's removal of terminal RPC client paths.

frontend/app/view/term/termwrap.ts (1)

8-8: LGTM - Import cleanup aligns with OSC handler removal.

The import changes are consistent with removing OSC 9283 Wave command handling. OSC 7 (cwd tracking) and OSC 16162 (shell integration) remain intact as expected.

pkg/blockcontroller/shellcontroller.go (1)

516-556: LGTM - Direct PTY read simplifies IO path.

Replacing the wshProxy-based PTY buffer with direct reads from shellProc.Cmd removes an unnecessary indirection layer. Error handling remains correct, and the change aligns with removing the WebSocket proxy infrastructure.

pkg/wshutil/wshutil.go (1)

128-135: LGTM - Simplified shutdown aligns with terminal handling removal.

The simplified DoShutdown implementation is consistent with removing terminal state restoration and signal handlers. While the terminal might not be restored on abnormal exit, this is expected given the PR's goal of removing all terminal-based infrastructure.

@sawka sawka merged commit adc823f into main Jan 2, 2026
7 checks passed
@sawka sawka deleted the sawka/remove-wave-osc branch January 2, 2026 19:51
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