feat(troubleshooting): Stack Usage section with periodic polling (zmk-module-devtool)#113
Merged
Merged
Conversation
Adds a "Stack Usage" card to the Troubleshooting page that polls cormoran__devtool (zmk-module-devtool PR #9) for per-thread stack high-water marks and visualises them with colour-coded progress bars. - proto/cormoran/devtool/devtool.proto — minimal proto covering only get_stack_usage (request field 17, response field 18) to match the firmware wire format without pulling in the full devtool proto - useDevtoolStackUsage hook — drains all paginated pages, exposes isPolling / pollIntervalMs / setPolling / setPollIntervalMs so the UI can auto-refresh on a 1/3/5/10 s interval - DevtoolStackUsageSection component — per-thread progress bars (green → amber → red at 60/80/90 %), auto-refresh toggle with interval picker, collapsed-header summary badge - Registers cormoran__devtool in the CustomSubsystemsPage supported set - Japanese translations for all new strings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19e555c to
5ec5f74
Compare
🚀 Cloudflare Workers PreviewPreview URL: https://423e4c7a-dya-studio-dev.cormoran707.workers.dev Deployed from commit 2506d22 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
cormoran__devtoolcustom subsystem (zmk-module-devtool PR #9) and polls per-thread stack high-water marksget_stack_usageand visualises results as colour-coded progress bars sorted by usage (green → yellow → amber → red at 60/80/90%)cormoran__devtoolin the "Already supported" set on the Custom Subsystems pageNew files:
proto/cormoran/devtool/devtool.proto— minimal proto covering onlyget_stack_usage(field 17/18 to match firmware wire format)src/proto/cormoran/devtool/devtool.ts— generated TypeScriptsrc/hooks/useDevtoolStackUsage.ts— hook with pagination + pollingsrc/components/troubleshooting/DevtoolStackUsageSection.tsx— UI componentDepends on: zmk-module-devtool PR #9 being merged and
CONFIG_ZMK_DEVTOOL_STACK_USAGE=yin firmware. Without it, the RPC returns an error which is displayed in the section (not available state is handled gracefully).Test plan
npm run build)npx tsc -b --noEmit, no new errors)npm run lint)CONFIG_ZMK_DEVTOOL_STACK_USAGE=y— Stack Usage section shows threads with progress barscormoran__devtoolsubsystem — section shows "Not available" notice🤖 Generated with Claude Code