Skip to content

feat(wcat): the manifest tells Desktop how to remove an account - #650

Draft
leemour wants to merge 2 commits into
mainfrom
feat/manifest-desktop-account-remove
Draft

leemour wants to merge 2 commits into
mainfrom
feat/manifest-desktop-account-remove

Conversation

@leemour

@leemour leemour commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Why

WireCat Desktop cannot sign out or remove an account of a tool it installed from the npm manifest (beeline, hubspot, attio). Its built-in catalog has accountRemove for its own tools; the manifest never carried it.

What

  • desktop.accountRemove, derived from the command tree in the exact shape of Desktop's catalog (AccountRemoveSource, wirecat-desktop src-tauri/src/account.rs):
    • signOut: {profile} session end --record --json when the CLI has session end.
    • remove: {profile} account remove --keep-data|--delete-data --record --json, dryRun: "--dry-run", confirm: "--yes", minVersion: "0.0.0", when account remove takes --keep-data, --delete-data and --dry-run (--yes is cli-core's global flag).
    • removes: ["signIn"], keeps: ["settings", "data", "listed"] as the catalog writes them for amo, bitrix and pbx; [] without a sign-out (zm).
  • Left out, not null, when the CLI has neither command or no profiles. Desktop's own_tools.rs entry_of refuses any desktop key it does not read, even a null one.
  • Reference table row and a changes/ fragment.

Last sync for a <noun> sync

sync.last was null for meetings sync, so Desktop showed no last-sync time. runs list matches command: exactly (cli-core src/runs/run.ts:311), so it is now one quoted word, as the catalog writes it for zm and pbx:

["runs","list","command:\"meetings sync\" status:success","--limit","50","--no-record","--json"]

SYNC_QUERY allows exactly this form, and only in sync.last. Desktop accepts the same form there in the change that reads accountRemove.

Do not release before Desktop reads the key and the query

Desktop 0.7.2 (and main today) has no accountRemove in own_tools.rs KEYS. A CLI that bumps to this version writes the key and Desktop refuses its manifest. Merge after the Desktop change that reads it ships.

Testing

  • src/wcat/manifest.test.ts: full remove, sign-out only, remove only, neither.
  • src/wcat/manifest.test.ts: the quoted last of a noun sync; the query parses as a phrase; the schema takes it in sync.last only and refuses near misses.
  • Built beeline, throwaway HOME: runs list 'command:"meetings sync" status:success' returns the recorded success run and not the failed one.
  • typecheck, lint, docs:check, full vitest: pass.
  • beeline-cli built and its manifest regenerated with this build: accountRemove equals amo's catalog entry. The words run against a throwaway profile (DBUS_SESSION_BUS_ADDRESS=disabled:, temp HOME): no unknown option.

🤖 Generated with Claude Code

WireCat Desktop could not sign out or remove an account of a tool it
installed from the npm manifest (beeline, hubspot, attio): its built-in
catalog has `accountRemove` for its own tools, the manifest never did.

`desktop.accountRemove` is now derived from the command tree, in the
exact shape Desktop's catalog uses (`AccountRemoveSource`):
- `signOut`: `{profile} session end --record --json` when the CLI has
  `session end`;
- `remove`: `account remove --keep-data|--delete-data`, `--dry-run`,
  `--yes`, `minVersion: "0.0.0"` (the manifest ships inside the version it
  describes) when `account remove` takes the first three (`--yes` is cli-core's
  global flag, so the command does not list it);
- `removes`/`keeps`: what the sign-out alone does, as the catalog writes
  it for amo, bitrix and pbx; `[]` when there is no sign-out (zm).

The key is left out, not null, for a CLI with neither command or without
profiles: Desktop's `own_tools.rs` refuses a manifest with any key it does
not read, even a null one, so a null would break every CLI's next bump.

The last-sync query of a `<noun> sync` stays null: `runs list` matches
`command:` exactly, and the catalog's `command:"meetings sync"` holds a
space and quotes, which Desktop's plain-word check refuses in a manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour marked this pull request as draft November 18, 2026 18:41
`desktop.sync.last` was null for a `<noun> sync` such as beeline's
`meetings sync`, so WireCat Desktop showed no last-sync time. `runs list`
matches `command:` exactly, so a two-word command is found only as the
quoted phrase. The manifest now writes it as one word, the form Desktop's
catalog uses for zm and pbx:

  runs list 'command:"meetings sync" status:success' --limit 50 --no-record --json

That word holds a space and quotes, so it is not a plain word.
`SYNC_QUERY` allows exactly this form, and only in `sync.last`; every
other array still takes plain words only. Desktop accepts the same form
there (decided with the Desktop change that reads it).

Checked on a built beeline in a throwaway HOME: the word returns the
recorded `meetings sync` run with status success and not the failed one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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