[feat](trx-rs): keep a station log, and a layout to work the bands from #59
Closed
sjg
wants to merge 0 commits from
feat/logbook-and-ham-layout into main
pull from: feat/logbook-and-ham-layout
merge into: :main
:main
:feat/logbook-contest-and-qsl
:feat/logbook-and-ham-layout
:docs/logbook-ham-layout-proposal
:fix/lazy-view-replay
:fix/digital-modes-active-rig
:fix/mini-view-active-rig
:feat/satellite-predictions-page
:fix/map-control-bar
:fix/decode-history-replay
:test/decoder-fixture
:feat/tools-active-state
:test/layout-regressions
:fix/statistics-alignment-and-routes
:fix/statistics-title-spacing
:feat/page-titles
:fix/tools-menu-button
:fix/menus-above-spectrum
:fix/more-menu-clipping
:fix/drop-rig-summary-from-top-bar
:fix/bookmark-host-contract
:feat/typescript-frontend-migration
:feat/audio-controls-section
:feat/scheduler-controls-section
:feat/capability-aware-workspaces
:fix/broadcast-layout-capability
:feat/ui-ux-overhaul
:fix/wfm-auto-bandwidth-interference
:fix/wfm-auto-bandwidth
:fix/default-build-unused-imports
:fix/workspace-clippy-warnings
:fix/vendor-opus-decoder
:fix/reliable-plugin-loader
:fix/nonblocking-history-persistence
:fix/complete-decoder-history-persistence
:fix/local-ais-map-icons
:ci/reuse-host-executor
:deploy/podman-act-runner
:ci/gitea-actions
No Reviewers
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
sjg (Stan Grams)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sjg/trx-rs#59
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #54. The logbook and the ham layout, in the shape the proposal settled on (merged as part of
docs/logbook-ham-layout-proposal).The crate
New
trx-logbookundersrc/trx-client/: the contact, the ADIF reader and writer, the file, and the rules for telling one contact from two. No new dependencies.ADIF, because it is the only thing the ecosystem reads — LoTW, eQSL, Club Log, QRZ and every other logger take it and nothing else, so a log that cannot write
.adicannot be uploaded, confirmed, or moved. The reader is forgiving in the ways real files are irregular: lowercase tags, CRLF, missing header, unknown fields, and a declared length that is the only thing that can end a value (ADIF values may contain<). Fields it does not model are carried through import to export unchanged, so a round trip does not strip what another program wrote. A record that cannot be read is reported and the rest of the file still loads.The file is JSON Lines, appended one line per contact. A log is the one thing here that cannot be regenerated, and the bookmark store's whole-file dump would rewrite megabytes to log one contact — and lose all of them if the power went halfway. An append costs at most the record being written, which a test proves by tearing a line in half and reopening. Edits append revisions, deletes append tombstones, and the file compacts through a temporary and a rename when the superseded outnumber the live.
Dedupe is callsign + band + mode within two minutes, compared as instants so midnight matches, with modes normalised so an imported
SSBfinds ourUSB.The panel
Its own tab, standing in every layout. An entry opens with six fields and no more — frequency, mode and rig name from the radio, the time from the server, and the callsign and locator of whatever decode it was started from. A report stays empty: an FT8 SNR is not what was sent. Your own callsign and locator are station identity on the top line, not per-contact fields.
Times are the server's, and the panel says so when the browser's clock is more than a second out. Worked-before answers as a callsign is typed. Import reports added, already-held and unreadable counts.
A decode is not a contact: the Log button on an FT8 or APRS row opens an entry and logs nothing by itself.
The layout
hamjoinscompact/broadcast/digital/full, opening on the logbook with the radio controls around it, gated onRigCapabilities.tx— a receiver has no contacts to log.Two bugs found on the way
20.000000trimmed of trailing zeros is2, because the run reaches back through the decimal point. Present in both the Rust and the TypeScript formatter I had just written; both fixed, with the regression pinned at 20, 100 and 10 MHz./api/logbook, not/logbook./bookmarksis registered as both an API and a page and whichever comes first wins; the logbook does not inherit that.Verification
trx-logbook: 27 unit tests — ADIF round trip, a file from another logger, rejected records, truncation, the declared-length rule, store reopen/edit/delete/tear/compaction, dedupe across the window and midnight, worked-before.trx-frontend-http: 3 new endpoint tests — write → list → worked → export, a read-only session refused, a contact with no callsign refused.tests/logbook.mjsin the browser suite: the log renders newest-first with sidebands, the entry pre-fills exactly six fields, worked-before flips as the callsign changes, logging writes and clears, a Log button on an FT8 row lands on the panel with the callsign, locator andFT8(not the rig'sDIG) and logs nothing, and the ham layout is offered with TX and withheld without it.cargo fmt --checkandclippy --all-targetsclean,trx-rs.toml.exampleregenerated.CLAUDE.mdthe crate, and the plan is marked as phases 1–4 done.Phase 5 (contest exchange fields, Cabrillo export, QSL/LoTW fields) is not included, as proposed.
Pull request closed