Go to a folder by name, with g then o #235

Closed
opened 2026-09-02 20:04:07 +00:00 by jcoffey-dev · 0 comments
Owner

Closes #233.

The g shortcuts cover the handful of folders every account has — inbox, sent, drafts, all mail — and nothing reaches the dozens a Sieve rule fills, which is where somebody with a real folder tree spends their time. g o opens a picker, you type part of a name, and you are there.

The one real decision

The picker is the same MailboxPicker the move action uses, with one difference that only shows up on shared mail: it selected folders by mayAddItems, which is right for a destination and wrong for a place to go. A shared folder you may read but not file into is somewhere you can visit.

The right is now a parameter (need), named for what it is asking rather than for which caller wants it, and documented at the prop — because that distinction is invisible on an unshared account, which is exactly where it would get silently reverted.

Hosting

AppShell, not MailView. The g shortcuts are global and MailView is not mounted to hear about it — pressing this from the calendar should still take you to a folder. Verified that it does.

The o clash, which is not one

o on its own opens a conversation. A pending prefix is tried before a bare key, so g o wins. That was already true and nothing said so out loud, which is the kind of invariant a later refactor quietly reverses — so there are now five tests for the sequence machinery, including one documenting that an abandoned prefix costs the prefix and not the keystroke after it. I had assumed the opposite when writing it; the code was right and the test now records which.

Verified in a browser

Against the mock: opened from /calendar, typed invo, narrowed to the nested Work / Invoices, Enter landed on it and closed the dialog, and o afterwards still opened a conversation rather than the picker.

npm run typecheck, npm test (992 web + 126 server), npm run build, i18n:check pass. One new string in all nine catalogues.

Note for the reporter

He mentions ihasmail not offering Gmail's g l for labels. Worth saying in the reply: g l is taken here — it goes to the Calendar.

Merged 2026-09-02 as coffey-labs/ihasmail@45f1309d06

Rebuilt from: git history, session transcript.

Closes #233. The `g` shortcuts cover the handful of folders every account has — inbox, sent, drafts, all mail — and nothing reaches the dozens a Sieve rule fills, which is where somebody with a real folder tree spends their time. `g` `o` opens a picker, you type part of a name, and you are there. ## The one real decision The picker is the same `MailboxPicker` the move action uses, with one difference that only shows up on shared mail: it selected folders by **`mayAddItems`**, which is right for a *destination* and wrong for a *place to go*. A shared folder you may read but not file into is somewhere you can visit. The right is now a parameter (`need`), named for what it is asking rather than for which caller wants it, and documented at the prop — because that distinction is invisible on an unshared account, which is exactly where it would get silently reverted. ## Hosting `AppShell`, not `MailView`. The `g` shortcuts are global and `MailView` is not mounted to hear about it — pressing this from the calendar should still take you to a folder. Verified that it does. ## The `o` clash, which is not one `o` on its own opens a conversation. A pending prefix is tried before a bare key, so `g o` wins. That was already true and nothing said so out loud, which is the kind of invariant a later refactor quietly reverses — so there are now **five tests for the sequence machinery**, including one documenting that an abandoned prefix costs the prefix and *not* the keystroke after it. I had assumed the opposite when writing it; the code was right and the test now records which. ## Verified in a browser Against the mock: opened from `/calendar`, typed `invo`, narrowed to the nested `Work / Invoices`, Enter landed on it and closed the dialog, and `o` afterwards still opened a conversation rather than the picker. `npm run typecheck`, `npm test` (992 web + 126 server), `npm run build`, `i18n:check` pass. One new string in all nine catalogues. ## Note for the reporter He mentions ihasmail not offering Gmail's `g` `l` for labels. Worth saying in the reply: `g` `l` is taken here — it goes to the Calendar. **Merged** 2026-09-02 as coffey-labs/ihasmail@45f1309d062b <sub>Rebuilt from: git history, session transcript.</sub>
This repo is archived. You cannot comment on issues.