Add guide: a browser walk-through that writes and runs a plan #41

Merged
jcoffey-dev merged 1 commits from feat/guide into main 2026-10-30 20:22:08 +00:00
Owner

Adds inbuxa-migrate guide <DIR>, the guided mode from the roadmap, with the domain path as its first flow. One account is a list of one, so it covers that case too.

The page asks where the mail is (IMAP with a master user, JMAP with an administrator, or Maildir folders), which accounts (pasted, a CSV, or read from a JMAP server's list) and which inbuxa server. It can create the accounts inbuxa doesn't have yet, previews with a dry run, then moves with progress, a report and a final pass.

It writes an ordinary plan.json and runs it with migrate, so the page and the command line can't disagree, and a move started in the browser can be finished from a terminal.

  • Served on 127.0.0.1 only, behind a random token. A request with the wrong Host or a foreign Origin is refused, and so is a POST that isn't JSON.
  • Passwords and keys stay in memory and reach the runs through environment variables. guide.json and the plan never hold them.
  • Uses std::net only, so there are no new dependencies. The page is plain HTML, CSS and JS, embedded in the binary.

Tests: unit tests for building the plan and the directory and for parsing requests; mock_guide drives the real binary offline; and a live test in integration_inbuxa runs Maildir → inbuxa through the guide with accounts created, which passes against the pinned 27.1-rc.4 image. I also clicked through the page in Chrome.

Not in this PR: Exchange and Google sources (they need item 13's device-code sign-in first), and a cutover command.

Adds `inbuxa-migrate guide <DIR>`, the guided mode from the roadmap, with the domain path as its first flow. One account is a list of one, so it covers that case too. The page asks where the mail is (IMAP with a master user, JMAP with an administrator, or Maildir folders), which accounts (pasted, a CSV, or read from a JMAP server's list) and which inbuxa server. It can create the accounts inbuxa doesn't have yet, previews with a dry run, then moves with progress, a report and a final pass. It writes an ordinary `plan.json` and runs it with `migrate`, so the page and the command line can't disagree, and a move started in the browser can be finished from a terminal. - Served on 127.0.0.1 only, behind a random token. A request with the wrong Host or a foreign Origin is refused, and so is a POST that isn't JSON. - Passwords and keys stay in memory and reach the runs through environment variables. `guide.json` and the plan never hold them. - Uses `std::net` only, so there are no new dependencies. The page is plain HTML, CSS and JS, embedded in the binary. Tests: unit tests for building the plan and the directory and for parsing requests; `mock_guide` drives the real binary offline; and a live test in `integration_inbuxa` runs Maildir → inbuxa through the guide with accounts created, which passes against the pinned 27.1-rc.4 image. I also clicked through the page in Chrome. Not in this PR: Exchange and Google sources (they need item 13's device-code sign-in first), and a `cutover` command.
jcoffey-dev added 1 commit 2026-10-30 20:17:23 +00:00
Add guide: a browser walk-through that writes and runs a plan
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 4m32s
ci / announce (pull_request) Skipped
e3a120b216
guide serves a page on 127.0.0.1, behind a random token, that asks where
the mail is (IMAP with a master user, JMAP with an administrator, or
Maildir folders), which accounts (pasted, a CSV, or the source's own
list) and which inbuxa server. It writes an ordinary plan, previews it
with migrate --dry-run, then runs it with progress, a report and a final
pass. Missing accounts can be created through import-directory, from the
source's directory or one made from the list.

Secrets stay in memory and reach the runs through environment variables.
Requests need the token, this host and, for a POST, JSON from this
origin. Tested offline through the real binary and live against inbuxa.
jcoffey-dev merged commit 6907ed22ee into main 2026-10-30 20:22:08 +00:00
jcoffey-dev deleted branch feat/guide 2026-10-30 20:22:08 +00:00
Sign in to join this conversation.