Skip to content

Conversation

@sawka
Copy link
Member

@sawka sawka commented Nov 11, 2025

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

This pull request introduces a new RPC command for checking Go version information across the full stack. It adds type definitions and handlers in TypeScript frontend types, Go RPC protocol types, client-side and server-side RPC handlers, and a new utility function in tsunami/build to detect Go executable location, version, and status. The command flows from the frontend through the RPC layer to the backend utility for executing and parsing Go version information.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20-30 minutes

  • Critical issue: pkg/wshrpc/wshserver/wshserver.go contains a duplicated CheckGoVersionCommand method definition. This will cause compilation failures and must be resolved by removing the duplicate occurrence.
  • Heterogeneous changes: Multiple file types (TypeScript, Go structs, interfaces, functions) and different architectural layers require separate reasoning for each file.
  • New logic in tsunami/build: The CheckGoVersion function introduces logic for executable detection, version parsing, and status determination that warrants careful inspection for correctness and edge case handling.
  • Cross-file consistency: Verify that field naming (e.g., GoStatus, GoPath, GoVersion, ErrorString/errorstring in JSON tags) is consistent across TypeScript types, Go types, and frontend/backend boundaries.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% 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; the description field is empty. Consider adding a brief description explaining the purpose, motivation, or use case for the new 'check go version' RPC command.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding a new 'check go version' command to the RPC system.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawka/check-go-version

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7955bf6 and b5860e2.

📒 Files selected for processing (6)
  • frontend/app/store/wshclientapi.ts (1 hunks)
  • frontend/types/gotypes.d.ts (1 hunks)
  • pkg/wshrpc/wshclient/wshclient.go (1 hunks)
  • pkg/wshrpc/wshrpctypes.go (3 hunks)
  • pkg/wshrpc/wshserver/wshserver.go (2 hunks)
  • tsunami/build/build.go (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 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/types/gotypes.d.ts
📚 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:

  • pkg/wshrpc/wshclient/wshclient.go
  • pkg/wshrpc/wshserver/wshserver.go
🧬 Code graph analysis (5)
pkg/wshrpc/wshrpctypes.go (2)
frontend/app/store/wshclientapi.ts (1)
  • CheckGoVersionCommand (46-48)
pkg/wshrpc/wshclient/wshclient.go (1)
  • CheckGoVersionCommand (63-66)
frontend/types/gotypes.d.ts (1)
pkg/wshrpc/wshrpctypes.go (1)
  • CommandCheckGoVersionRtnData (1023-1028)
frontend/app/store/wshclientapi.ts (1)
pkg/wshrpc/wshrpctypes.go (2)
  • RpcOpts (351-357)
  • CommandCheckGoVersionRtnData (1023-1028)
pkg/wshrpc/wshclient/wshclient.go (3)
frontend/app/store/wshclientapi.ts (1)
  • CheckGoVersionCommand (46-48)
pkg/wshutil/wshrpc.go (1)
  • WshRpc (47-61)
pkg/wshrpc/wshrpctypes.go (2)
  • RpcOpts (351-357)
  • CommandCheckGoVersionRtnData (1023-1028)
pkg/wshrpc/wshserver/wshserver.go (4)
pkg/wshrpc/wshclient/wshclient.go (1)
  • CheckGoVersionCommand (63-66)
pkg/wshrpc/wshrpctypes.go (1)
  • CommandCheckGoVersionRtnData (1023-1028)
pkg/wconfig/filewatcher.go (1)
  • GetWatcher (33-57)
tsunami/build/build.go (1)
  • CheckGoVersion (166-246)
⏰ 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: Analyze (go)
  • GitHub Check: Build for TestDriver.ai
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
pkg/wshrpc/wshserver/wshserver.go (1)

1077-1090: Go check handler plugs in cleanly. Lean surface on top of tsunami/build.CheckGoVersion, so we reuse the shared detection logic without duplicating parsing work.

pkg/wshrpc/wshrpctypes.go (1)

170-170: RPC surface updates stay consistent. New command constant, interface method, and payload struct line up with the handler wiring, so consumers get strongly typed results end-to-end.

Also applies to: 339-340, 1023-1028

tsunami/build/build.go (1)

122-246: Nice consolidation of Go detection. Extracting CheckGoVersion (with structured status + path) prevents future drift between environment checks and RPC usage while keeping error handling straightforward.

frontend/types/gotypes.d.ts (1)

176-183: TS type mirrors the backend payload. Field names match the JSON tags, so frontend callers can lean on ambient typing without additional casts.

frontend/app/store/wshclientapi.ts (1)

45-48: Client wrapper follows the house pattern. Reuses the standard wshRpcCall path with a null payload, keeping the API surface consistent.

pkg/wshrpc/wshclient/wshclient.go (1)

62-66: LGTM!

The implementation correctly follows the established pattern for RPC commands with no input payload. The function signature, command name, and return type are consistent with the related changes across the stack.


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.

@sawka sawka merged commit 3a08c55 into main Nov 11, 2025
7 of 8 checks passed
@sawka sawka deleted the sawka/check-go-version branch November 11, 2025 06:46
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