Card 466 is built: the plugin's settings now have a Mint token button next to the "Connor plugin token" field, and the version is 0.4.4. (+82/−34, +0 mod) #28
Loading…
Reference in a new issue
No description provided.
Delete branch "build/6542a038"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
code: 3 source files in src/; 4 files; 3 test files in test/; 1 more kind(s) (+199/−48)
build/6542a038→main— 11 file(s), +199/−48.source: 3 file(s), +82/−34
other: 4 file(s), +6/−5
tests: 3 file(s), +96/−0
docs: 1 file(s), +15/−9
README.mdmanifest.jsonpackage-lock.jsonpackage.jsonsrc/lib/auth.tssrc/main.tssrc/settings.tstest/api.test.tstest/settings.test.tstest/stubs/plugin.tsversions.jsonGrowth
Why
Joel, card 466 is built: the plugin's settings now have a Mint token button next to the "Connor plugin token" field, and the version is 0.4.4. The whole gate (
npm run gate: type-check, build verify, then the tests) ran green with 304 tests passing. It ships once you've reviewed it.What the button does. It sends
POST /vault/tokenwith{vault, label: "obsidian plugin"}. The vault is the plugin's own Vault name setting, the same slug it sends to/vault/registerand/vault/connect. The request always goes out on the cookie session, even when an old token is already in the box, because the server refuses a plugin token on that route. If the cookie can't be read, it falls back to the usual credentialed fetch. On success the token goes into the setting, gets saved, the link reconnects with it, and the settings pane redraws so the box holds it. A 401, a 403, a redirect, or a reply that turns out to be the sign-in page all bring up "Connor: sign in through the Connor panel first, then press Mint token". Any other refusal shows the server's own wording, such as "no vault 'v' registered for you". Nothing logs the token, and the success notice doesn't show it.Which main I built on. I have no git or forge access in this run, so I couldn't read main's head on the forge. This working copy is main at
91a1331, which is the merge of card 465's PR #27, and it was already at 0.4.3. I bumped to 0.4.4 in all four version files. If main has moved past 0.4.3 since, the bump needs redoing. […]Gate
npm run gateran 304 tests in 4.5s and exited 0 — green.Flow engine
Built by Connor's frontend backburner (dispatch
6542a038) in an isolated clone; shipped deterministically byship.py. The full build notes were spoken in conversation and stored in memory (agent-dispatch:6542a038). Review is the gate.The brief this build was given
Kept for provenance. This is the task the builder was dispatched with — not a description of the diff above.
Card 466. First check main on the forge, not a stale copy: card 465's PR may already have bumped the version to 0.4.3. Add a "Mint token" button beside the existing "Connor plugin token" settings field (card 463). On click, while the plugin is signed in through the normal cookie path, POST /vault/token with JSON {vault: <this vault's registered name, the same one the plugin already sends to /vault/register or /vault/connect>, label: "obsidian plugin"}. The server is in connor/vaulttoken.py: it is a signed-in route, not a plugin route, so it has to use the cookie session. It replies {token, id, ...}, and the token is shown only in that reply. Save the token into the setting, persist it, and reconnect with it. If the request gets 401/403 or a redirect to sign-in, show a Notice like "Sign in through the Connor panel first, then press Mint token". Never log the token. Bump the version past whatever main has now so the self-updater offers it, and update the README token section to say "press Mint token". Tests for success, signed out, and the token not being logged. Built by my frontend backburner (dispatch 6542a038), diff verified by git; shipped by ship.py. Nothing merges without review.Independent review — reviewer-bot (local model
qwen2.5-coder:14b)The PR adds a 'Mint token' button to the plugin settings, which sends a POST request to mint a new token. The implementation seems correct, but there are some suggestions for improvement.
Suggestions (non-blocking)
src/settings.ts:120— The 'Mint token' button is added directly in the settings tab. Consider creating a separate method or component to handle this functionality for better code organization and reusability.src/main.ts:360— The 'mintToken' method is quite long. Consider breaking it down into smaller, more focused methods to improve readability and maintainability.README.md:145— The README mentions that the token is never logged, but it could be clearer about where the token is stored or how it is handled after minting. This might help users understand the security measures in place.