[refactor] notes carry a severity; expiry carries its own state - #18
Merged
Conversation
|
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.



An audit of every user-facing string found the panel reads as wall-to-wall warnings: 35 notes on one real board, all 35 wearing an amber warning triangle, because
NoteListstyles every note identically andnotesis aVec<String>with nothing to style by. Meanwhile 51 of ~180 note sites were copies of seven templates, each one a fact that should have had a type.On a real board: 35 notes → 17 (11 info, 5 warn, 1 problem); amber triangles 35 → 6. Probe call sites went 169 → 144, with ~33 note sites deleted outright.
The types
Expiryreplaces 13 paragraphs explaining whyexpires_atwas null and 3 near-verbatim "a refresh token exists, so this timestamp is not the login" notes. The panel shows a chip —auto-renewed/no expiry/expiry unknown— with the reason as its tooltip.expires_atis now structurally derived, not maintained: the field is gone andProfilehand-writesSerialize, emitting it fromexpiry.deadline(), so there is nowhere for the two to disagree. Deserialization still lifts a bare 0.3.xexpires_attoExpiry::At.ActiveConceptreplaces the 6 "this tool has no active X" notes. It is an enum rather thanOption<String>becauseNone-means-no-concept inverts the common default, and because stripe, flyctl, supabase and op all keep a realactiveand have no persistent selection —NotApplicablemeans "no selection to switch", not "active is empty".ExecDisabledis a new variant onSwitchOutcomeandVerifyOutcome. The stringcommand execution is disabled for this probe— patchbay's own internal switch, leaked to the user in 5 places — no longer exists as a user-facing reason. The panel greys the button with a tooltip.Two channels the panel was silently dropping
ToolStatushas always serializedadvisories(with real severity:AdvisoryKind+is_blocking()) andversion. The panel's TS interface declared neither, so both were discarded on arrival — a tool whose auth plugin had been removed looked identical to one that was fine, and only patchbay's own version was ever displayed. Both now render: advisories in their own section above notes, styled byis_blocking(); version as installed → latest with the source and the update command.latest: nullstays "patchbay did not find out", never "you are up to date".Deletions
The 13 expiry paragraphs, the 3 refresh-token copies, the 6 no-active notes, the 5 exec-disabled reasons, neon's "the config directory is still neonctl" (trivia, and the neon advisory already covers the rename), aws's "AWS_PROFILE is not set, so default is in effect" (inverted — it now speaks only when the variable is set), and the counting notes already carried in profile meta.
Judgement calls that differ from the plan
Hostaliases from~/.ssh/config, not key files — deleting it removed the only inventory of what keys exist.migrate/export.rskeepsVec<String>in the bundle manifest. The bundle is versioned separately from the status JSON and the approved break was the status shape.Expiry::unknown("in the system keychain")was applied even to tokens sitting in plaintext inhosts.yml, where the tooltip would have lied. It branches on the storage now.versionturned out to be dropped too, which is why it is fixed here rather than filed.Breaking
notesbecomes[{kind, text}]and profiles gainexpiry, inpb --jsonand MCP output.expires_atstill ships. Release is 0.4.0.smoke.shwas tightened to assert the note shape, valid kinds, valid expiry states,active_concept.kind, and thatexpires_atis non-null iffstate == "at".647 workspace tests pass; fmt + clippy
-D warnings(workspace and src-tauri) +bun run buildclean.