Skip to content

feat: a keys page that says whose each key is, and can replace one safely - #50

Merged
fylorn merged 1 commit into
devfrom
feat/keys-page
Sep 19, 2026
Merged

fylorn merged 1 commit into
devfrom
feat/keys-page

Conversation

@fylorn

@fylorn fylorn commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

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.

  • Whose key is this. Every row names the client it was made for and whether that client is adopted — including cancelled ones, where the key is kept for 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 rather than by the client's self-reported header.
  • What happens if it leaks. Replacing a key an adopted client uses says, before it acts, that the client needs restarting — read from that client's own takes_effect, not assumed — then does both writes in one call and repeats the restart notice at the end, where it is actionable.
  • The default key is marked, cannot be deleted or disabled, and refused menu items stay visible and say why.
  • Everything is a dialog now, like upstreams and routing.

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. Clients lost 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 warnings pass.

🤖 Generated with Claude Code

…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>
@fylorn
fylorn merged commit 5e57ff6 into dev Sep 19, 2026
2 checks passed
@fylorn
fylorn deleted the feat/keys-page branch September 19, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant