Repository navigation
feat: a keys page that says whose each key is, and can replace one safely - #50
Merged
Merged
Conversation
…fely The page was a table you edited in place: the full key sat in the second column, the route was a dropdown, delete was a button beside it. It could not answer the questions someone opens it to ask. **Whose key is this.** Each row names the client it was made for and whether that client is adopted — including the ones cancelled, where the key is kept for the next time. The value is masked to its ends; copying goes through a command that reads the plaintext in Rust, so the webview never gets a clipboard it can write anything into. **Is it still in use.** 24-hour requests and last use, counted by key. The existing last-seen counts by the client's self-reported header, which anyone can write. **What happens if it leaks.** Replacing a key an adopted client uses now says, before it acts, that the client needs restarting — taken from the client's own "takes effect" rather than assumed — then does both writes in one call and repeats the restart where it belongs, at the end. The default key is marked, cannot be deleted or disabled, and the menu items that are refused stay visible and say why. Everything else is a dialog, like upstreams and routing. Adoption no longer builds keys out of YAML fragments in the interface: core resolves or creates the client's key while it writes, so a failure can no longer leave a client configured with a key that does not exist. Pins core v0.9.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The redesign of the keys page, on top of core v0.9.0 (ThinkWatchProject/ThinkWatch-Core#48).
The page was a table you edited in place: the full key in the second column, the route a dropdown, delete a button beside it. It could not answer what someone opens it to ask.
takes_effect, not assumed — then does both writes in one call and repeats the restart notice at the end, where it is actionable.Adoption no longer assembles keys out of YAML fragments in the interface: core resolves or creates the client's key while it writes, so a failure can no longer leave a client configured with a key that does not exist.
Clientslost the two props it needed for that.Checked in an isolated preview against the real components: the table, the row menu (including the disabled delete), the edit dialog, and the whole rotate flow for an adopted client that needs a restart.
pnpm typecheck,pnpm test(105),pnpm build,cargo fmt --check,cargo clippy -D warningspass.🤖 Generated with Claude Code