Repository navigation
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Pre-merge checks |
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d30d2c91-ccfa-442c-bb2f-c68bdab57d2b
📥 Commits
Reviewing files that changed from the base of the PR and between 36d45af and bb39fddf8673f01e974ba1723570586418e2bbc4.
📒 Files selected for processing (26)
src/main/codex-accounts/service.test.tssrc/main/rate-limits/kiro-usage-fetcher.test.tssrc/main/rate-limits/kiro-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/components/settings/appearance-status-bar-kiro-toggle-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-agent-gating.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
8b18923 to
55daad2
Compare
|
@coderabbitai review |
|
|
@coderabbitai summary |
✅ Action performedSummary regeneration triggered. |
55daad2 to
8b580a3
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2e202022-5caa-433e-87f2-a3f0047701d9
📥 Commits
Reviewing files that changed from the base of the PR and between 3246b73 and 8b580a3c86981b47be5e9fde27da4e5d57834ce6.
📒 Files selected for processing (28)
src/main/codex-accounts/service.test.tssrc/main/rate-limits/kiro-usage-fetcher.test.tssrc/main/rate-limits/kiro-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/components/settings/appearance-status-bar-kiro-toggle-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/renderer/src/components/status-bar/status-bar-agent-gating.tssrc/renderer/src/components/status-bar/status-bar-provider-letter.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
🚧 Files skipped from review as they are similar to previous changes (25)
- src/shared/rate-limit-types.ts
- src/shared/status-bar-defaults.ts
- src/renderer/src/components/stats/GrokUsagePane.test.tsx
- src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
- src/renderer/src/components/status-bar/status-bar-provider-letter.test.ts
- src/shared/types.ts
- src/renderer/src/web/web-preload-api.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/shared/rate-limit-types.test.ts
- src/renderer/src/store/slices/ui.ts
- src/renderer/src/components/settings/appearance-status-bar-kiro-toggle-search.ts
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/i18n/locales/en.json
- src/main/rate-limits/kiro-usage-fetcher.test.ts
- src/main/codex-accounts/service.test.ts
- src/renderer/src/store/slices/ui.test.ts
- src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
- src/main/rate-limits/service.test.ts
- src/main/rate-limits/service.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
8b580a3 to
3db3907
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
@brennanb2025 gentle ping when you have a chance — the two CodeRabbit threads are addressed (3a6ab81e for the non-date reset labels, ad228dc3 for routing |
ad228dc to
0577bb2
Compare
|
Rebased onto current Fresh validation:
@coderabbitai review |
|
🧠 Learnings used✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
0577bb2 to
b0732f2
Compare
|
Rebased onto current main, migrated Kiro provider mocks/UI migration assertions to the split test layout, and fixed the settings helper import exposed by the current shared-type split. Validation: 153 affected tests passed; Node and Web typechecks passed; changed-file oxlint and diff check passed. Fork workflow runs are awaiting maintainer approval. |
b0732f2 to
1ceb70a
Compare
|
Rebased onto current |
formatRateLimitResetLabel returned null for human-readable resetDescription values such as "Thu" or "2:30 PM" because only ISO dates were recognized. Return non-date descriptions unchanged so the status bar keeps a valid reset label.
execFile cannot launch configured .cmd/.bat paths directly on Windows. Route the Kiro usage command through getSpawnArgsForWindows like the other usage fetchers; native binaries keep the direct execFile path.
The Antigravity coverage landed upstream after this branch last rebased. Its test file predates the Kiro provider, so the shared resetRateLimitProviderMocks harness now fails on the unmocked fetchKiroRateLimits import. Declare the same vi.mock the other service test files use.
Upstream now feeds a ticking `now` into ProviderRateLimitWindowSection; `formatRateLimitResetLabel` gains an optional `now` (default Date.now()) so the label keeps re-rendering on the clock without inventing reset times.
Signed-off-by: guanbear <123guan@gmail.com>
ae77061 to
b28b50e
Compare
|
Rebased onto current main ( |
# Conflicts: # src/main/rate-limits/rate-limit-service-test-harness.ts # src/main/rate-limits/service-account-target-selection.test.ts # src/main/rate-limits/service-inactive-account-previews.test.ts # src/main/rate-limits/service-live-claude-usage.test.ts # src/main/rate-limits/service-minimax-usage.test.ts # src/main/rate-limits/service-refresh-orchestration.test.ts # src/main/rate-limits/service-window-activation.test.ts # src/main/rate-limits/service/service-full-cycle-application.ts # src/main/rate-limits/service/service-full-cycle-preparation.ts # src/main/rate-limits/service/service-polling.ts # src/main/rate-limits/service/service-state.ts # src/main/rate-limits/service/service-types.ts # src/renderer/src/components/settings/appearance-status-bar-search.ts # src/renderer/src/components/status-bar/StatusBarProviderSegment.tsx # src/renderer/src/components/status-bar/StatusBarVisibilityMenu.tsx # src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts # src/renderer/src/components/status-bar/status-bar-agent-gating.ts # src/renderer/src/components/status-bar/status-bar-provider-visibility.ts # src/renderer/src/components/status-bar/usage-provider-settings-target.ts # src/renderer/src/components/status-bar/use-status-bar-controller.ts # src/renderer/src/i18n/locales/en.json # src/renderer/src/store/slices/ui-hydration-workspace-preferences.test.ts # src/renderer/src/store/slices/ui/ui-slice-hydration-status-bar-items.ts # src/shared/persisted-ui-state-types.ts # src/shared/rate-limit-state-factory.ts # src/shared/rate-limit-types.test.ts # src/shared/rate-limit-types.ts # src/shared/rpc-contract/client-ui-params.ts # src/shared/status-bar-defaults.ts # src/shared/ui-chrome-types.ts
|
Thanks for your patience. I brought this branch up to current On the current head, Node 24 |
# Conflicts: # src/renderer/src/components/status-bar/StatusBarProviderSegment.tsx # src/renderer/src/i18n/locales/en.json
|
Thanks for your patience. I merged the latest On this head, |
|
Thanks for your review and patience. I have updated the branch against main The fetcher now uses the shared The real Kiro CLI 2.28.0 usage output parsed successfully. All three TypeScript projects, seven changed-code quality checks, pre-commit lint/format checks and the diff check pass. The two status-bar suites pass all 64 tests; the PR description records the broad run and successful reruns of its eight initially failing cases accurately. Existing screenshots are marked as an earlier visual baseline. Could you please approve the fork workflow run when convenient? I appreciate your guidance. |
|
Correction to my earlier note: #14001 stays the home for the Kiro usage work. I rebuilt #26639 on top of this PR's current head ( Please disregard the suggestion to close this one. #26639 should land after it. @guanbear thanks for keeping this up to date. |
Carries forward the fixes from stablyai#26390 that the stablyai#14001 head does not have: - Local agent detection validates a configured KIRO_CLI_PATH with the same resolution the usage fetcher uses, so a Kiro CLI outside PATH keeps its meter and menu toggle; an invalid configured command is not detected, and WSL detection is unaffected. - The usage command is killed at the 1 MiB output cap and truncated output is rejected instead of being parsed as a valid total. - Reset descriptions that are not ISO dates (for example "01/01") are kept as display text instead of failing to parse.
|
Thanks @w-felipe360 for clarifying the scope and keeping #26639 separate. I have updated this PR against current main ( Validation on this update: 842 focused tests passed (one platform-specific skip); Node, CLI, and renderer typechecks and the changed-code quality gates passed. The screenshots in the description remain explicitly labeled as the earlier visual baseline. This PR remains the home for Kiro usage. #26639 can follow it; its stacked base may need refreshing to the new head. Thank you! |
|
Hi @guanbear, quick update. I moved the Kiro agent status and session history work into its own PR on top of That leaves three usage fixes from my old #26390 that this branch still doesn't have. They fit better here, next to the fetcher, so feel free to take them as they are:
--- a/src/main/rate-limits/kiro-usage-fetcher.ts
+++ b/src/main/rate-limits/kiro-usage-fetcher.ts
@@ const runCommand: CommandRunner = async (command, args, signal) => {
maxOutputBytes: 1024 * 1024,
+ killOnOutputLimit: true,
signal
})
- if (result.code !== 0 || result.timedOut || result.signal !== null) {
+ if (result.code !== 0 || result.timedOut || result.signal || result.outputTruncated) {
throw new Error('Kiro usage command failed')
@@ export function parseKiroUsageOutput(output: string): ProviderRateLimits {
- const header = readable.match(
- /Estimated Usage\s*\|\s*resets on (\d{4}-\d{2}-\d{2})\s*\|\s*([^\n]+)/i
- )
+ const header = readable.match(/Estimated Usage\s*\|\s*resets on\s+([^|\n]+?)\s*\|\s*([^\n]+)/i)
+ const resetDescription = header?.[1].trim()
@@
- if (!header || usedPercent === null || !Number.isFinite(usedPercent)) {
+ if (!header || !resetDescription || usedPercent === null || !Number.isFinite(usedPercent)) {
@@
- resetDescription: header[1]
+ resetDescription
--- a/src/main/preflight/agent-detection.ts
+++ b/src/main/preflight/agent-detection.ts
+import { resolveKiroCommand } from '../rate-limits/kiro-usage-fetcher'
@@ export async function detectInstalledAgents(context?: PreflightRuntimeContext): Promise<string[]> {
+ const wslTarget = getPreflightWslTarget(context)
...
- return resolveDetectedTuiAgentIds(
+ const detected = resolveDetectedTuiAgentIds(
...
)
+ if (!wslTarget && process.env.KIRO_CLI_PATH?.trim()) {
+ const kiro = await findRunnableLocalCommand(resolveKiroCommand())
+ return kiro.status === 'available'
+ ? [...new Set([...detected, 'kiro'])]
+ : detected.filter((id) => id !== 'kiro')
+ }
+ return detectedIf you'd rather cherry-pick, the full commit with tests is w-felipe360/orca@9cc7e7c1a6. It covers the non-ISO reset, the output-limit kill, truncated output and three |
Carries forward the fixes from stablyai#26390 that the stablyai#14001 head does not have: - Local agent detection validates a configured KIRO_CLI_PATH with the same resolution the usage fetcher uses, so a Kiro CLI outside PATH keeps its meter and menu toggle; an invalid configured command is not detected, and WSL detection is unaffected. - The usage command is killed at the 1 MiB output cap and truncated output is rejected instead of being parsed as a valid total. - Reset descriptions that are not ISO dates (for example "01/01") are kept as display text instead of failing to parse.
|
Thanks @w-felipe360 for separating the status/history work and sharing the usage fixes. I cherry-picked The final scoped runs pass: 63 fetcher/detection/lifecycle tests and 118 tooltip/settings/preference tests. All seven changed-code quality gates and TypeScript 7 Node/CLI/Web product-code checks pass. Full test-inclusive typechecks could not complete on this desktop, and a broad concurrent test rerun hit renderer timeouts; those limitations are recorded in the description. Real local Kiro 2.29.1 The usage change remains separate from the merged #26695 status/history/resume feature. Could a maintainer approve the fork CI checks for this updated head when convenient? Thank you. |
|
I tested this head (
Both builds ran from The checks you couldn't finish locally:
I didn't check the tooltip, the narrow |


ELI5
Orca can already launch Kiro, but it cannot show how much of the current Kiro subscription credit allowance has been used. This adds a Kiro usage meter to the status bar using Kiro CLI's own local
/usagecommand.What Changed
kiro-cli chat /usage --no-interactive --wrap neverwith no shell and a 20-second timeout.Qas Kiro's compact narrow-layout badge so it remains distinct from Kimi'sK.Why
Kiro is already a first-class Orca agent, and the official CLI exposes subscription usage locally through
/usage. Surfacing that existing information alongside Claude, Codex, Gemini, Grok, and other providers makes Orca's usage bar useful to Kiro users without copying credentials or depending on a private HTTP API.Linked Issue
Related to #9559. This PR surfaces local subscription usage; it does not add Kiro account management.
Visual Proof
Both screenshots use a fresh isolated profile. The before image is upstream
mainat the earlier3246b73abaseline; the after image is the PR at the same visual baseline. The current branch incorporatesmainatc43ac3fc3c6c, including the newly merged ZCode usage meter. The screenshots document the earlier visual baseline; the October 12 update was verified with product-code typechecks and focused tests, with full-check limitations documented below.The after view adds the Kiro usage toggle alongside Orca's existing provider meters. Compact layouts use
Qso Kiro remains distinct from Kimi'sK.How To Test
kiro-cli.kiro-cli chat '/usage' --no-interactive --wrap neverreturns the Estimated Usage view.Qwhile Kimi usesK.kiro-clifromPATHand confirm the provider degrades to unavailable without exposing a local path or subprocess error.Validation
Current update — 2026-10-12
Merged upstream main
c43ac3fc3c6cand preserved the newly merged Claude usage messages and Kiro status/history/resume support. Cherry-picked @w-felipe360's9cc7e7c1a6(original authorship retained): local detection honors a validKIRO_CLI_PATH, truncated usage output is killed and rejected, and non-ISO reset descriptions remain display text with no invented countdown. Adapted the fetcher and test mock to main's@orca/process-hostboundary./usageexited 0; its credits and2026-11-01reset description parsed successfully. No account details are published.Earlier verification — 2026-10-09
Current update: upstream main
820277c20778, 2026-10-09./usagesucceeded and the current parser returned statusok. No account quota or credentials are included here.Security And Privacy
runProcessutility with a fixed argument list and no shell, cancellation support, a 20-second timeout, and a 1 MiB output limit. Nonzero exits and timed-out/signalled processes are rejected even when stdout looks valid.KIRO_CLI_PATHand known install locations while preserving the same no-shell execution path.Review
Qbadge remains distinct from Kimi'sK; the full provider menu and tooltip still say Kiro.AI Disclosure
Implemented and validated with OpenAI Codex. This October update received separate Spec and Standards reviews using Codex; these are not cross-model reviews.
Checklist
main.Author