-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(ui): implement usage statistics badge for top bar (ACS-228) #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
StillKnotKnown
wants to merge
302
commits into
AndyMik90:develop
from
StillKnotKnown:stillknotknown/acs-228-ui-usage-statistics-badge-for-top-bar
Closed
Changes from all commits
Commits
Show all changes
302 commits
Select commit
Hold shift + click to select a range
92c6f27
fix(python): use venv Python for all services to fix dotenv errors (#…
AlexMadera e1b0f74
fix(updater): proper semver comparison for pre-release versions (#313)
MikeeBuilds e80ef79
fix(project): fix task status persistence reverting on refresh (#246)…
MikeeBuilds 661e47c
fix(ci): add auto-updater manifest files and version auto-update (#317)
MikeeBuilds cb6b216
fix(tasks): sync status to worktree implementation plan to prevent re…
AlexMadera 8a80b1d
fix(ci): remove version bump to fix branch protection conflict (#325)
MikeeBuilds 50e3111
feat: bump version (#329)
AlexMadera d3a63b0
perf: convert synchronous I/O to async operations in worktree handler…
JoshuaRileyDev fec6b9f
refactor(settings): remove deprecated ProjectSettings modal and hooks…
Mitsu13Ion 9734b70
chore: Refactor/kanban realtime status sync (#249)
souky-byte 787667e
refactor(components): remove deprecated TaskDetailPanel re-export (#344)
Mitsu13Ion d51f456
feat: centralize CLI tool path management (#341)
Furansujin 9d43abe
refactor: remove deprecated code across backend and frontend (#348)
Mitsu13Ion fef07c9
feat: add terminal dropdown with inbuilt and external options in task…
JoshuaRileyDev 40d04d7
chore: bump version to 2.7.2-beta.10
AndyMik90 e9782db
fix(ui): close parent modal when Edit dialog opens (#354)
MikeeBuilds 4dcc5af
fix: make backend tests pass on Windows (#282)
tosincarik 4e71361
fix(analyzer): add C#/Java/Swift/Kotlin project files to security has…
MikeeBuilds 7881b2d
fix(terminal): preserve terminal state when switching projects (#358)
AndyMik90 1fa7a9c
fix: Resolve pre-commit hook failures with version sync, pytest path,…
ianstantiate eabe7c7
fix(subprocess): handle Python paths with spaces (#352)
MikeeBuilds 20f20fa
fix(security): invalidate profile cache when file is created/modified…
MikeeBuilds 753dc8b
fix(perf): remove projectTabs from useEffect deps to fix re-render lo…
MikeeBuilds 9bbdef0
fix/Improving UX for Display/Scaling Changes (#332)
kvnloo 2d3b7fb
docs: add security research documentation (#361)
bdmorin 0ca2e3f
fix: fixed version-specific links in readme and pre-commit hook that …
ianstantiate db0cbea
fix: Memory Status card respects configured embedding provider (#336)…
MikeeBuilds bc22064
Fixes failing spec - "gh CLI Check Handler - should return installed:…
ianstantiate 8b4ce58
fix(ideation): update progress calculation to include just-completed …
illia1f 7751588
fix(github): improve PR review with structured outputs and fork suppo…
AndyMik90 68548e3
feat(analyzer): add iOS/Swift project detection (#389)
MikeeBuilds aaa8313
fix: improve CLI tool detection and add Claude CLI path settings (#393)
jslitzkerttcu 98b12ed
fix(ui): prevent TaskEditDialog from unmounting when opened (#395)
MikeeBuilds 321c971
fix(analyzer): move Swift detection before Ruby detection (#401)
MikeeBuilds 0513121
fix: 2.7.2 bug fixes and improvements (#388)
AndyMik90 9aef0dd
fix(frontend): add .js extension to electron-log/main imports
AndyMik90 a39ea49
chore(ci): remove redundant CLA GitHub Action workflow
AndyMik90 4bdf7a0
fix(github): pass repo parameter to GHClient for explicit PR resoluti…
AndyMik90 230de5f
feat(build): add Flatpak packaging support for Linux (#404)
Mitsu13Ion e7e6b52
fix(model): respect task_metadata.json model selection (#415)
AndyMik90 2f66246
fix: Allow windows to run CC PR Reviewer (#406)
AlexMadera 0a571d3
feat: add gitlab integration (#254)
Mitsu13Ion 717fba0
feat: enhance pr review page to include PRs filters (#423)
AlexMadera 62a7551
fix(spec_runner): add --base-branch argument support (#428)
Mitsu13Ion 88c7605
fix(client): add spec_dir to SDK permissions (#429)
Mitsu13Ion 515b73b
ci: remove conventional commits PR title validation workflow
AndyMik90 bdb0154
feat: Enhance the look of the PR Detail area (#427)
AlexMadera 798ca79
fix(ui): add fallback to prevent tasks stuck in ai_review status (#397)
MikeeBuilds ac8dfca
refactor: remove deprecated TaskDetailPanel component (#432)
Mitsu13Ion 666794b
feat(frontend): Add Files tab to task details panel (#430)
Mitsu13Ion 3c0708b
fix(windows): resolve EINVAL error when opening worktree in VS Code (…
fireapache 203a970
fix: infinite loop in useTaskDetail merge preview loading (#444)
abe238 c15bb31
fix: accept Python 3.12+ in install-backend.js (#443)
abe238 2effa53
fix: prevent infinite re-render loop in task selection useEffect (#442)
abe238 da31b68
feat: remove top bars (#386)
fireapache 5d8ede2
Fix/2.7.2 beta12 (#424)
AndyMik90 0f9c5b8
fix(pr-review): treat LOW-only findings as ready to merge (#455)
AndyMik90 fb6b7fc
fix: create spec.md during roadmap-to-task conversion (#446)
Pranaveswar19 52a4fcc
fix(ci): add Rust toolchain for Intel Mac builds (#459)
AndyMik90 7210610
Fix/windows issues (#471)
AndyMik90 8e5c11a
chore: bump version to 2.7.2-beta.12 (#460)
AndyMik90 4da8cd6
fix(detection): support bun.lock text format for Bun 1.2.0+ (#525)
AndyMik90 8d58dd6
fix: prefer versioned Homebrew Python over system python3 (#494)
mirzaaghazadeh 344ec65
fix(pr-review): use temporary worktree for PR review isolation (#532)
AndyMik90 3db02c5
fix(csp): allow external HTTPS images in Content-Security-Policy (#549)
MikeeBuilds 30f7951
fix: resolve frontend lag and update dependencies (#526)
AndyMik90 f58c257
fix(memory): fix learning loop to retrieve patterns and gotchas (#530)
AndyMik90 7990dcb
fix(ui): preserve original task description after spec creation (#536)
AndyMik90 29e4550
fix: detect and clear cross-platform CLI paths in settings (#535)
AndyMik90 c2148bb
fix(ci): add Python setup to beta-release and fix PR status gate chec…
AndyMik90 16a7fa4
fix(merge): resolve KanbanBoard conflicts favoring develop
AndyMik90 90a2032
feat(terminal): respect preferred terminal setting for Windows PTY shell
AndyMik90 90dddc2
fix(ci): cache pip wheels to speed up Intel Mac builds
AndyMik90 dedd075
# 🔥 hotfix(electron): restore app functionality on Windows broken by …
sniggl 6d4231e
ci(release): add CHANGELOG.md validation and fix release workflow
AndyMik90 04de8c7
fix(merge): handle Windows CRLF line endings in regex fallback
AndyMik90 effaa68
fix: Solve ladybug problem on running npm install all on windows (#576)
AlexMadera 6ac3012
2.7.2 release
AndyMik90 2880baf
Merge branch 'fix/2.7.3-hotfixes' into develop
AndyMik90 d278963
feat: custom Anthropic compatible API profile management (#181)
gnoviawan 3086233
Improving Task Card Title Readability (#461)
fireapache 5efc2c5
docs: update stable download links to v2.7.2 (#579)
AlexMadera 4a83304
feat: add Dart/Flutter/Melos support to security profiles (#583)
Mitsu13Ion 6c85590
fix(kanban): complete refresh button implementation (#584)
MikeeBuilds 14b3db5
fix: pass electron version explicitly to electron-rebuild on Windows …
fireapache f5be794
fix(frontend): resolve PATH and PYTHONPATH issues in insights and cha…
hluisi 7177c79
fix: human_review status persistence bug (worktree plan path fix) (#605)
MikeeBuilds 13535f1
feat(terminal): add worktree support for terminals (#625)
AndyMik90 acdd7d9
refactor(github-review): replace confidence scoring with evidence-bas…
AndyMik90 556f0b2
fix(frontend): filter empty env vars to prevent OAuth token override …
Ashwinhegde19 4ec9db8
fix: security hook cwd extraction and PATH issues (#555, #556) (#587)
hluisi f7b02e8
fix(ci): include update manifests for architecture-specific auto-upda…
hluisi 39da819
Fix/small fixes 2.7.3 (#631)
AndyMik90 46c41f8
fix: change hardcoded Opus defaults to Sonnet (fix #433) (#633)
MikeeBuilds b720312
fix(ui): update TaskCard description truncation for improved display …
AndyMik90 e1e8943
fix(mcp): use shell mode for Windows command spawning (#572)
andydataguy eeef8a3
fix: check .claude.json for OAuth auth in profile scorer (#652)
MikeeBuilds 65f6089
fix(python): sanitize environment to prevent PYTHONHOME contamination…
MikeeBuilds 234d44f
fix(settings): allow toggle deselection and improve embedding model n…
MikeeBuilds 8be0e6f
feat(sentry): add anonymous error reporting with privacy controls (#636)
AndyMik90 1e3e8bd
Fix/update app (#594)
AndyMik90 6fb2d48
fix: improve GLM presets, ideation auth, and Insights env (#648)
StillKnotKnown c271354
fix: detect Claude CLI installed via NVM on Linux/macOS (#623)
StillKnotKnown 7b4993e
Fix/small fixes all around (#645)
AndyMik90 35573fd
fix(frontend): detect @lydell/node-pty prebuilts in postinstall (#673)
fireapache 63f4617
sentry dev support + sessions handling in terminals
AndyMik90 81afc3d
fix(terminal): resolve React Fast Refresh hook error in usePtyProcess
AndyMik90 e293732
docs: add stars badge and star history chart to README (#675)
eddie333016 3930b12
fix(a11y): Add missing ARIA attributes for screen reader accessibilit…
Orinks 2c9fcbf
chore: Update Linux app icon to use multiple resolution sizes and fix…
Pdzly 97f3449
fix(github): pass OAuth token to Python runner subprocesses (fixes #5…
MikeeBuilds ec4441c
fix: centralize Claude CLI invocation (#680)
StillKnotKnown 5005e56
Fix Window Size on Hi-DPI Displays (#696)
aaronson2012 78aceae
fix(profiles): support API profiles in auth check and model resolutio…
gnoviawan 09aa4f4
fix: WIndows not finding the gith bash path (#724)
AlexMadera 574cd11
fix: pass augmented env to Claude CLI validation on macOS (#640)
tallinn102 8a4b506
fix: show OAuth terminal during profile authentication (#671)
bvdr 84bc522
fix(setup): auto-create .env from .env.example during backend install…
Crimson341 df57fbf
fix: InvestigationDialog overflow issue (#669)
jackchuka 2f321fb
Fix: Security allowlist not working in worktree mode (#646)
arcker 724ad82
fix(a11y): Add context menu for keyboard-accessible task status chang…
Orinks 78b80bc
fix: Multiple bug fixes including binary file handling and semantic t…
AndyMik90 7fda36a
fix: use --continue instead of --resume for Claude session restoratio…
AndyMik90 e9c859c
fix(memory): use Homebrew for Ollama installation on macOS (#742)
MikeeBuilds e3d72d6
refactor: simplify task description handling and improve modal layout…
AndyMik90 f406959
fix(startup): prevent app freeze by making Claude CLI detection non-b…
aslaker 31519c2
fix: add helpful error message when Python dependencies are missing (…
StillKnotKnown 5e78390
fix(roadmap): normalize feature status values for Kanban display [ACS…
MikeeBuilds 96b7eb4
ACS-103 Windows can finish a task (#739)
AlexMadera 01decae
fix(memory): handle Ollama version errors during model pull (#760)
bbopen fbaf2e7
fix(windows): add pywin32 dependency for LadybugDB (#627) (#778)
AndyMik90 cbd47f2
fix(insights): await async sendMessage to prevent race condition (#61…
AndyMik90 061411d
fix(python-bundling): verify critical packages exist, not just marker…
AndyMik90 cc78d7a
fix(multi-project): filter task IPC events by project to prevent cros…
AndyMik90 4203341
fix(permissions): grant worktree access to original project directori…
AndyMik90 4cc9198
fix(frontend): ensure PATH includes system directories when launched …
czerewacz 63766f7
feat(pr-review): add prominent verdict summary to PR review comments …
AndyMik90 40fc7e4
fix(terminal): prevent crash after worktree creation (#771)
AndyMik90 a47354b
fix: add PYTHONPATH to subprocess environment for bundled packages (#…
AndyMik90 29ef46d
fix: resolve subtasks tab not updating on Linux (#794)
StillKnotKnown 05c652e
fix(ui): enable scrolling in Project Files list in Task Creation Wiza…
Ashwinhegde19 a6ffd0e
feat: Add terminal copy/paste keyboard shortcuts for Windows/Linux (#…
StillKnotKnown ab3149f
fix(a11y): restore missing aria-label attributes on icon buttons (#808)
Orinks e310d56
fix: increase Claude SDK JSON buffer size to 10MB (#815)
StillKnotKnown a74bd86
feat: add PR creation workflow for task worktrees (#677)
ThrownLemon 32e8fee
fix: automate auto labeling based on comments (#812)
AlexMadera cbb1cb8
feat(github): enhance PR merge readiness checks with branch state val…
AndyMik90 ada91fb
feat: add Claude Code changelog link to version notifiers (#820)
StillKnotKnown 07ae1ef
Fix pydantic_core missing module error during packaging (#806)
MaximStone 63e142a
feat: Add Sentry environment variables to CI build workflows (#803)
AndyMik90 2045884
ci(release): add Azure Trusted Signing for Windows builds (#805)
AndyMik90 c623ab0
fix(github): use selectedPR from hook to restore Files changed list (…
StillKnotKnown dc29794
fix(ACS-51, ACS-55, ACS-71): Fix Kanban state transitions and status …
aslaker 152678b
fix(ci): use HTTP for Azure Trusted Signing timestamp URL (#843)
AndyMik90 660e1ad
fix(ui): display subtask titles instead of UUIDs (#844) (#849)
AndyMik90 11710c5
fix: improve Claude CLI detection on Windows with space-containing pa…
g1331 91bd240
fix(ui): persist staged task state across app restarts (#800)
AndyMik90 df540ec
refactor(ui): extract shared task form components for consistent moda…
AndyMik90 a6bd884
Fix/worktree branch selection (#854)
AndyMik90 6dc538c
fix: properly quote Windows .cmd/.bat paths in spawn() calls (#889)
StillKnotKnown d9ed817
fix(github-prs): show running review state when switching back to PR …
StillKnotKnown d024eec
fix(merge): resolve multiple merge-related issues (ACS-194, ACS-179, …
StillKnotKnown 96fc612
fix(ACS-203): Fix Kanban status flip-flop and phase state inconsisten…
StillKnotKnown f43c7c5
fix(ui): add Post Clean Review button for clean PR reviews (ACS-201) …
StillKnotKnown c4e08ae
fix(build): remove obsolete @lydell/node-pty extraResources entry
29d28bf
fix(planner): enforce implementation_plan schema (issue #884) (#912)
g1331 d9e3b28
fix(graphiti): add isinstance(dict) validation to prevent AttributeEr…
StillKnotKnown 0c139ad
fix(memory): use shared project-wide memory for cross-spec learning (…
StillKnotKnown 3ca15e1
fix(ACS-175): Resolve integrations freeze and improve rate limit hand…
MikeeBuilds 9e86de7
fix(frontend): strip ANSI escape codes from roadmap/ideation progress…
StillKnotKnown 179744e
fix(frontend): prevent "Render frame was disposed" crash (ACS-211) (#…
StillKnotKnown 3c56a1b
fix(core): implement atomic JSON writes to prevent file corruption (A…
StillKnotKnown 8eb6681
fix(workspace): auto-rebase spec branch when behind before merge (#94…
StillKnotKnown 57903fe
New/relase (#949)
AndyMik90 9543561
Merge main into develop and fix CodeQL issues
AndyMik90 24e6f95
fix: address CodeQL and PR review findings
AndyMik90 462af9b
fix(ci): fix semver comparison and changelog formatting
AndyMik90 e0b6aa3
Merge main into develop after squash merge of v2.7.3
AndyMik90 5ef67b0
Merge main into develop (sync after v2.7.3 release fixes)
AndyMik90 228d877
ci: add Azure auth test workflow
AndyMik90 b995a55
fix(worktree): handle "already up to date" case correctly (ACS-226) (…
StillKnotKnown e396168
docs: update README download links to v2.7.3 (#973)
AndyMik90 5e84912
fix(terminal): add collision detection for terminal drag and drop reo…
AndyMik90 8cacff2
fix(ACS-181): enable auto-switch on 401 auth errors & OAuth-only prof…
MikeeBuilds a172d7d
feat(ui): implement usage statistics badge for top bar (ACS-228)
StillKnotKnown de7776b
test: add comprehensive tests for usage indicator and profile usage s…
StillKnotKnown 74236a3
fix: address PR review findings
StillKnotKnown 32f4e12
fix: address CodeQL security findings
StillKnotKnown 0b147c7
fix: address Auto Claude PR review findings
StillKnotKnown a4e5d22
fix: address additional code review feedback
StillKnotKnown a710b32
fix: resolve @shared alias issue in main process
StillKnotKnown 4e7689d
fix: address additional code review feedback
StillKnotKnown 3bb1bec
fix: revert tooltip test changes to use original working approach
StillKnotKnown 00e6fa4
fix: remove unused RESETTING_SOON import from usage-monitor
StillKnotKnown 6e26674
fix: address additional code review feedback - round 2
StillKnotKnown 4070683
fix: revert * 100 removal and remove problematic RESETTING_SOON test
StillKnotKnown 8aa2a32
fix: remove unused RESETTING_SOON import from test file
StillKnotKnown 75d0824
feat(frontend): add Claude Code version rollback feature (#983)
AndyMik90 c004fac
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
AndyMik90 e211e47
fix: address code review findings for usage statistics feature
StillKnotKnown 9f0aa1d
fix: correct Z.ai API response structure based on actual API
StillKnotKnown 9c025a7
fix(security): inherit security profiles in worktrees and validate sh…
AndyMik90 8145f29
feat(frontend): add searchable branch combobox to worktree creation d…
AndyMik90 e6235e6
fix(frontend): sync worktree config to renderer on terminal restorati…
AndyMik90 89587a6
fix(merge): include files with content changes even when semantic ana…
AndyMik90 ca8f6f1
fix(terminal): detect Claude exit and reset label when user closes Cl…
AndyMik90 8eaa926
fix(app-update): persist downloaded update state for Install button v…
AndyMik90 f1377ef
fix(backend): add Sentry integration and fix broken pipe errors (#991)
AndyMik90 c6f2560
fix: improve Claude CLI detection and add installation selector (#1004)
AndyMik90 c618a26
ci(release): move VirusTotal scan to separate post-release workflow (…
AndyMik90 e1b8b0d
fix(ui): display actual base branch name instead of hardcoded main (#…
AndyMik90 32eac72
test: add additional test coverage for usage indicator
StillKnotKnown b729c36
fix(github-prs): prevent preloading of PRs currently under review (#1…
AndyMik90 a1b258a
chore: bump version to 2.7.4
AndyMik90 d25244b
fix: populate timestamp fields in CLI fallback for countdown timer
StillKnotKnown 3d0b2cb
fix(security): inherit security profiles in worktrees and validate sh…
AndyMik90 18e3708
feat(frontend): add searchable branch combobox to worktree creation d…
AndyMik90 388df7a
fix(frontend): sync worktree config to renderer on terminal restorati…
AndyMik90 e7d0599
fix(merge): include files with content changes even when semantic ana…
AndyMik90 685ecc0
fix(terminal): detect Claude exit and reset label when user closes Cl…
AndyMik90 9d06b37
fix(app-update): persist downloaded update state for Install button v…
AndyMik90 9808753
fix(backend): add Sentry integration and fix broken pipe errors (#991)
AndyMik90 f284526
fix: improve Claude CLI detection and add installation selector (#1004)
AndyMik90 91a978d
ci(release): move VirusTotal scan to separate post-release workflow (…
AndyMik90 bebc075
fix(ui): display actual base branch name instead of hardcoded main (#…
AndyMik90 7c076d2
fix(github-prs): prevent preloading of PRs currently under review (#1…
AndyMik90 b56c833
fix: distinguish OAuth tokens from regular API keys for api.anthropic…
StillKnotKnown fefc17a
hotfix/sentry-backend-build
AndyMik90 08e7933
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
StillKnotKnown 9a4c99e
fix: address code review findings for usage statistics
StillKnotKnown 4ab288a
fix(github): resolve circular import issues in context_gatherer and s…
AndyMik90 023b6e8
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
StillKnotKnown 5dbcc80
feat(sentry): embed Sentry DSN at build time for packaged apps (#1025)
AndyMik90 d723cb5
Fix Duplicate Kanban Task Creation on Rapid Button Clicks (#1021)
AndyMik90 58010fa
feat(terminal): add YOLO mode to invoke Claude with --dangerously-ski…
AndyMik90 7414811
Make worktree isolation prominent in UI (#1020)
AndyMik90 2f24c69
fix(terminal): improve worktree name input UX (#1012)
AndyMik90 a5359bc
fix(terminal): enhance terminal recreation logic with retry mechanism…
AndyMik90 86e7c34
fix: address code review findings - API retry and bounds validation
StillKnotKnown 1869dcf
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
StillKnotKnown fee5574
fix: add missing usage badge event forwarding to renderer
StillKnotKnown 120071c
feat(terminal): add task worktrees section and remove terminal limit …
AndyMik90 6e46ec4
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
StillKnotKnown 57bd8ee
Add file/screenshot upload to QA feedback interface (#1018)
AndyMik90 810ba39
fix(auth): await profile manager initialization before auth check (#1…
StillKnotKnown 5506449
Merge branch 'develop' into stillknotknown/acs-228-ui-usage-statistic…
StillKnotKnown acee593
fix: use profile-specific environment for CLI usage fetching
StillKnotKnown e122978
fix: show usage badge even when proactive swap is disabled
StillKnotKnown a2a4d0b
fix: add getAPIProfileUsage API for on-demand usage badge display
StillKnotKnown dcbee64
Merge upstream/develop
StillKnotKnown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -607,6 +607,32 @@ export function registerTerminalHandlers( | |
| ); | ||
|
|
||
|
|
||
| // Get usage statistics for active profile (API-based, on-demand) | ||
| ipcMain.handle( | ||
| IPC_CHANNELS.PROFILES_GET_USAGE, | ||
| async (): Promise<IPCResult<import('../../shared/types').ClaudeUsageSnapshot>> => { | ||
| try { | ||
| const { fetchActiveProfileUsage } = await import('../services/profile'); | ||
| const result = await fetchActiveProfileUsage(); | ||
|
|
||
| if (!result.success || !result.usage) { | ||
| return { | ||
| success: false, | ||
| error: result.error || 'Failed to fetch usage data' | ||
| }; | ||
| } | ||
|
|
||
| return { success: true, data: result.usage }; | ||
| } catch (error) { | ||
| return { | ||
| success: false, | ||
| error: error instanceof Error ? error.message : 'Failed to fetch usage data' | ||
| }; | ||
| } | ||
| } | ||
| ); | ||
|
|
||
|
|
||
| // Terminal session management (persistence/restore) | ||
| ipcMain.handle( | ||
| IPC_CHANNELS.TERMINAL_GET_SESSIONS, | ||
|
|
@@ -761,12 +787,36 @@ export function initializeUsageMonitorForwarding(mainWindow: BrowserWindow): voi | |
|
|
||
| // Forward usage updates to renderer | ||
| monitor.on('usage-updated', (usage: ClaudeUsageSnapshot) => { | ||
| mainWindow.webContents.send(IPC_CHANNELS.USAGE_UPDATED, usage); | ||
| if (!mainWindow.isDestroyed()) { | ||
| mainWindow.webContents.send(IPC_CHANNELS.USAGE_UPDATED, usage); | ||
| } | ||
| }); | ||
|
|
||
| // Forward proactive swap notifications to renderer | ||
| // Forward proactive swap completed events to renderer | ||
| monitor.on('proactive-swap-completed', (data: any) => { | ||
| if (!mainWindow.isDestroyed()) { | ||
| mainWindow.webContents.send(IPC_CHANNELS.PROACTIVE_SWAP_NOTIFICATION, { | ||
| type: 'completed', | ||
| ...data | ||
| }); | ||
| } | ||
|
Comment on lines
+796
to
+802
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider typing event data parameters. The Also applies to: 806-812 🤖 Prompt for AI Agents |
||
| }); | ||
|
|
||
| // Forward proactive swap failed events to renderer | ||
| monitor.on('proactive-swap-failed', (data: any) => { | ||
| if (!mainWindow.isDestroyed()) { | ||
| mainWindow.webContents.send(IPC_CHANNELS.PROACTIVE_SWAP_NOTIFICATION, { | ||
| type: 'failed', | ||
| ...data | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| // Forward show-swap-notification events (for in-app swap notifications) | ||
| monitor.on('show-swap-notification', (notification: unknown) => { | ||
| mainWindow.webContents.send(IPC_CHANNELS.PROACTIVE_SWAP_NOTIFICATION, notification); | ||
| if (!mainWindow.isDestroyed()) { | ||
| mainWindow.webContents.send(IPC_CHANNELS.PROACTIVE_SWAP_NOTIFICATION, notification); | ||
| } | ||
| }); | ||
|
|
||
| debugLog('[terminal-handlers] Usage monitor event forwarding initialized'); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note