Skip to content

Add rtk-ai as experimental feature#201

Draft
ScDor wants to merge 8 commits intocoollabsio:mainfrom
ScDor:rtk-ai-global-toggle
Draft

Add rtk-ai as experimental feature#201
ScDor wants to merge 8 commits intocoollabsio:mainfrom
ScDor:rtk-ai-global-toggle

Conversation

@ScDor
Copy link
Copy Markdown

@ScDor ScDor commented Mar 14, 2026

solves #163

Summary

  • Adds a gated RTK integration flow so RTK can be enabled globally and per backend, with prompts/tool guidance wired into Claude, Codex, and OpenCode sessions.
  • Improves RTK runtime reliability in headless/service environments by resolving the RTK binary from RTK_BIN, PATH, and common user bin locations.
  • Fixes RTK gain parsing to support current RTK JSON shapes (date/week_start/month, *_tokens fields) and prevents false startup noise when older RTK CLIs do not support --opencode.
  • Improves preferences patch UX by using optimistic cache updates (with rollback on error), so toggles apply immediately and no longer appear stuck.

Validation

  • Frontend build: bun run build
  • Backend build: cargo build --release
  • Targeted frontend tests:
    • src/services/preferences.test.ts
    • src/components/preferences/panes/UsagePane.test.tsx
    • src/components/preferences/panes/IntegrationsPane.test.tsx
    • src/components/preferences/panes/ExperimentalPane.test.tsx
  • Targeted Rust tests:
    • cargo test parse_rtk_gain_output --release

Notes

  • check:all still has pre-existing unrelated lint failures outside this PR’s diff.
  • Older RTK CLI versions that lack rtk init --opencode are now handled gracefully (logged as informational skip).

@ScDor
Copy link
Copy Markdown
Author

ScDor commented Mar 14, 2026

will reopen after some more testing

@ScDor ScDor closed this Mar 14, 2026
@ScDor ScDor reopened this Mar 16, 2026
@ScDor ScDor changed the title Add gated RTK AI integration and usage metrics Add rtk-ai as experimental feature Mar 16, 2026
@ScDor ScDor marked this pull request as draft March 16, 2026 21:33
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