Pick several notes in the list and act on them at once (#212) #250

Closed
kayg wants to merge 3 commits from issue/212-multi-select into dev
Owner

Closes #212.

Picking (lib/picked.svelte.ts, the same grammar as block mode in #208)

  • Click opens, as before. ⌘-click (Ctrl elsewhere) adds or removes a note; the open note joins the first time, like Finder. ⇧-click picks a range. ⌘A, with the list focused, picks the whole list. ⇧↑/⇧↓ grow or shrink the range. Esc lets go.
  • Touch: a long press (480 ms, under 8 px of movement) starts picking; after that, taps add or remove. It never opens the context menu or the iOS callout.
  • Picked rows get the same soft fill as picked blocks, and nothing else, so nothing moves.

Bar (a bar mode in BottomBar)

  • With 2 or more picked (or 1 after a long press), the bar becomes: count · Pin/Unpin · Add a tag · Copy links · Move to the Trash · Done. Add a tag opens a sheet out of the bar (TagSheet; it shares tagSource and cleanTag with #168's "+" picker).
  • On the phone, the bar comes up on the list screen in place of the +.
  • #145's in-bar toasts aren't in yet, so results use the shared undoable toast. Moving them into the bar later only changes lib/many.ts.

Editor pane: a calm summary in place of the note: a small fanned stack of the first titles, "N notes", the names, and how to change the selection. The open note stays mounted underneath, so letting go shows it at once.

Server: notes.change-many {ids, op: delete|pin|unpin|tag, tag?} (crates/notes/src/many.rs)

  • One bulk-edit job per action. Delete uses the existing Trash step. Pin, unpin and tag use a new Change step, which works out its edit when it runs, on the note's text at that moment, and sends it through the room. Undo turns it into an inverse edit merged with anything typed since. A note that already has the change is skipped.
  • Tags are added to the tags: property, written the way the note already writes it, so no line of text moves.
  • It answers within 3 s, and a bigger job carries on in the background (bulk::start and run_for, the same code as #101's, so that merge is trivial).
  • Trash moves and restores now run 4 at a time instead of 32. At 32, deleting 1,000 notes stalled typing elsewhere for up to 14 s. At 4, the worst is 0.9 s and the job is faster (perf numbers on the issue).

Client: a bulk delete takes the rows out in one redraw. Undoing 1,000 restores now reloads the list twice; before, one reload was queued per restored note.

Tests: 3 Rust integration tests and 4 unit tests (delete+undo, pin/tag+undo keeps typing, retries, refusals, every way tags: is written). e2e/picking.spec.ts covers Chromium and WebKit at 1440 and 390. Screenshots and perf numbers are on #212.

Note for merging: #101 also changes bulk/mod.rs (start/run_for are identical) and search.rs (I added a small tags_in there; with #101 it becomes tags::all).

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Closes #212. **Picking** (lib/picked.svelte.ts, the same grammar as block mode in #208) - Click opens, as before. ⌘-click (Ctrl elsewhere) adds or removes a note; the open note joins the first time, like Finder. ⇧-click picks a range. ⌘A, with the list focused, picks the whole list. ⇧↑/⇧↓ grow or shrink the range. Esc lets go. - Touch: a long press (480 ms, under 8 px of movement) starts picking; after that, taps add or remove. It never opens the context menu or the iOS callout. - Picked rows get the same soft fill as picked blocks, and nothing else, so nothing moves. **Bar** (a bar mode in BottomBar) - With 2 or more picked (or 1 after a long press), the bar becomes: count · Pin/Unpin · Add a tag · Copy links · Move to the Trash · Done. Add a tag opens a sheet out of the bar (TagSheet; it shares `tagSource` and `cleanTag` with #168's "+" picker). - On the phone, the bar comes up on the list screen in place of the +. - #145's in-bar toasts aren't in yet, so results use the shared `undoable` toast. Moving them into the bar later only changes `lib/many.ts`. **Editor pane**: a calm summary in place of the note: a small fanned stack of the first titles, "N notes", the names, and how to change the selection. The open note stays mounted underneath, so letting go shows it at once. **Server**: `notes.change-many {ids, op: delete|pin|unpin|tag, tag?}` (crates/notes/src/many.rs) - One bulk-edit job per action. Delete uses the existing Trash step. Pin, unpin and tag use a new `Change` step, which works out its edit when it runs, on the note's text at that moment, and sends it through the room. Undo turns it into an inverse edit merged with anything typed since. A note that already has the change is skipped. - Tags are added to the `tags:` property, written the way the note already writes it, so no line of text moves. - It answers within 3 s, and a bigger job carries on in the background (`bulk::start` and `run_for`, the same code as #101's, so that merge is trivial). - Trash moves and restores now run 4 at a time instead of 32. At 32, deleting 1,000 notes stalled typing elsewhere for up to 14 s. At 4, the worst is 0.9 s and the job is faster (perf numbers on the issue). **Client**: a bulk delete takes the rows out in one redraw. Undoing 1,000 restores now reloads the list twice; before, one reload was queued per restored note. **Tests**: 3 Rust integration tests and 4 unit tests (delete+undo, pin/tag+undo keeps typing, retries, refusals, every way `tags:` is written). e2e/picking.spec.ts covers Chromium and WebKit at 1440 and 390. Screenshots and perf numbers are on #212. Note for merging: #101 also changes `bulk/mod.rs` (start/run_for are identical) and `search.rs` (I added a small `tags_in` there; with #101 it becomes `tags::all`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- List: ⌘/Ctrl-click adds or removes, ⇧-click picks a range, ⌘A the
  whole list, ⇧↑/⇧↓ grow the range, Esc lets go. On touch, a long press
  starts picking and taps add or remove. Picked rows get the soft fill
  picked blocks get (#208's grammar).
- Bar: with several picked it morphs into Pin/Unpin, Add a tag, Copy
  links, Move to the Trash and Done; Add a tag grows a sheet out of it.
  The editor pane shows a calm summary instead of one note.
- Server: notes.change-many {ids, op, tag?} runs delete, pin, unpin or
  add-tag as one bulk-edit job (new Change step, worked out when it
  runs, through each note's room), answers within 3 s and goes on in
  the background; notes.undo takes it back as one step.
- Client: a bulk delete drops the rows in one redraw; a thousand
  restores from Undo reload the list twice, not a thousand times.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Deleting 1,000 notes on the 10k Home with 32 moves at once stalled typing
elsewhere for up to 14 s (p95 4.7 s). With 4: max 0.9 s, p95 232 ms, and
the job is faster too (76 s against 99 s on a loaded machine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Merge remote-tracking branch 'origin/dev' into issue/212-multi-select
Some checks failed
CI / web (pull_request) Failing after 33s
CI / rust (pull_request) Successful in 2m16s
64be24a386
# Conflicts:
#	apps/web/src/components/PhoneStack.svelte
#	apps/web/src/components/TagPicker.svelte
Author
Owner

Closed (2026-10-16). Multi-select is rebuilt on the rowActions registry with two-finger select (new issue).

Closed (2026-10-16). Multi-select is rebuilt on the rowActions registry with two-finger select (new issue).
kayg closed this pull request 2026-10-16 03:57:40 +00:00
Some checks failed
CI / web (pull_request) Failing after 33s
CI / rust (pull_request) Successful in 2m16s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!250
No description provided.