Repository navigation
feat(dashboards): register maps and recording to file - #17
Merged
Merged
Conversation
The user's decisions (2026-11-06): an imported register map becomes a dashboard with a table panel; recording writes a dashboard's variables, scaled, as a wide CSV, one file per day. The spec records the inventory (our CSV parser, plugin-fs append, the dialog scopes: save grants one file, a folder pick grants the folder) and the measurement that the native GTK dialog can be driven under Xvfb with xdotool, so both features get a real E2E on Linux. The plan splits the work into six tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
A register map in CSV (name, table, address, type, and optionally byte order, units, decimals and two-point scaling) becomes a new dashboard with one table panel that reads every row through the existing grouped reads. The table exports the same CSV, and a file with one invalid row is refused whole, with its line and column: a map imported in part looks complete. Addresses are protocol addresses; the 40001 notation is refused with the reason, since guessing it would shift every register by one unnoticed. The parser reuses src/lib/csv.ts; number formatting moved to i18n.svelte.ts so the value panel and the table share it. Tests: example cases from a drive's table, every refused cell, and a fast-check round trip. The E2E imports a map through the native GTK dialog, driven with xdotool under Xvfb (keys sent before the dialog is ready are lost, measured, so the answer is repeated until the dialog closes), checks the values read from pymodbus, scaled and formatted, and compares the exported file. Windows cannot drive native dialogs: the run says those checks did not run. Local: 90/90. CI installs xdotool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
The GTK folder dialog could not be driven in the E2E: the typed path and Enter enter the folder, and neither a second Enter nor Alt+S selects it. After three attempts the user chose a fixed folder, which needs no dialog and gets a real E2E on Linux and Windows: Documents/ModbusTool/recordings, or ~/ModbusTool/recordings where no Documents folder is defined (on Linux it comes from user-dirs.dirs, often missing on WSL2, containers and CI; dirs 7.0.0). The fs scope covers only those two folders. No Open folder button: tauri-plugin-opener added 457 lockfile lines (zbus) for it. Columns of unnamed variables take the title of the panel that shows only them. Measured: rows go on with the window hidden; a 200-register map at 1 s writes about 1 KB a row (about 90 MB a day) at 0.7% of one core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
Record writes the dashboard's variables, scaled, as a wide CSV: a time column in local time that spreadsheets read as a date, then one column per location the dashboard reads, named after the variable or the panel that shows it, with its units. A row is written when a reading arrives, at most one per half period, so the cadence needs no timer and survives a hidden window (measured); without good readings no row is written and the gap is visible. Cells of values not read stay empty. Files go to Documents/ModbusTool/recordings, or ~/ModbusTool/recordings where the system names no Documents folder, one per day; a file of the day with the same columns is continued, one with other columns gets a _2 copy. A failed write or folder stops the recording and says why. The fs scope is limited to those two folders. Tests: the pure parts (columns, header, local time, file names, cadence) and the recorder with fs mocked (day change, existing and foreign files, home fallback, failures). E2E on Linux and Windows: records the dashboard at 200 ms against pymodbus and checks the file's pressure column and row spacing. Local: 91/91. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
…cation The README lists both features and documents the register map format (columns, values, the 40001 notation); the changelog has them under Unreleased; the verification file records the E2E (91/91), the separate measurements and what they do not show: no native dialogs on Windows, a hidden window under Xvfb only, a one-minute load test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…ding Version 3.5.0 in package.json, Cargo.toml and tauri.conf.json, and the changelog section named after it. The page lists the two new features; eight cards fit two rows of four on a desktop (cards from 240 px), one column on a phone, no horizontal scroll (checked in dark, light and phone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
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.
What & why
Spec:
docs/superpowers/specs/2026-11-06-register-maps-logging-design.md. Plan:docs/superpowers/plans/2026-11-06-register-maps-logging.md. Verification:docs/superpowers/verification/2026-11-06-register-maps-logging.md.Register maps
Recording
Documents/ModbusTool/recordings, or~/ModbusTool/recordingswhere no Documents folder is defined (Linux without XDG user dirs). The fs scope covers only those two folders.Decisions changed by measurements (recorded in the spec)
tauri-plugin-openeradded 457Cargo.locklines (zbus). The status shows the full file path instead.Closes #
Type
Checklist
npm run check && npm run lint && npm run format:check && npm testpass. 146 tests.cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testpass (insrc-tauri/). No Rust code changed; only the capability file changed.npm run file-size); touched files refactored on touch. Number formatting is now shared ini18n.svelte.ts.npm run e2e): 91/91 locally.CHANGELOG.mdupdated if behaviour or interfaces changed, perCLAUDE.md. The changes are under Unreleased.Notes for reviewers
knip.jsonlists it as a binary.Generated by Claude Code