You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 14325cb
Browse filesBrowse the repository at this point in the historyBrowse files
Tool calls fold into one drawer per run, shut until clicked
A run of tool calls was open by default while its turn ran (the last run,
Fold.open's live default), so a working thread showed every call. Now a
run is a drawer that only the person's click opens (Fold.run.open, laws
fold_run_opened/shut/default_shut/live_shut), running or not; a second
click shuts it. The live run's head says what runs now instead
("5 tool calls · running: Bash", Fold.label.live, RHead's live flag, the
new string fold.running in en and ja), and pulses on the web.
Every client takes it from the same roles: the web's head is one tidy
line (View.fold.row.live, classes fold/open/live) and an open run's rows
hang under it on a rule (data-run, View.run.mark, style.css); the window
(layout.bend) and the phones (Mob.fold.live, "live"; open rows carry
"run", Mob.run.mark) draw the same rows. The unused turn fold
(Work.turn) is shut while live too (law work_live_open becomes
work_live_shut). Fold.open keeps its live default for the subagents'
panel and the to-dos.
fold_test joins the required fast tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ When using Bend:
42
42
-`src/core/slash.bend`: slash commands in the composer (pure: the table, Backplane's `/btw` and `/give` for any thread, Claude's `/compact` and `/context` only in a Claude thread; `Slash.typing` is a draft that is one word starting with `/`, `Slash.cmds` those whose name starts with it). The composer's popup (client.bend's `Skills.all`, `Slash.of`) lists them with their text, then the thread's skills as `$name` rows, at most 8; `/` fetches the skills like `$` (`Skills.need`). Esc shuts any popup (`skill-close`, info `sk.off` holds the draft it was shut on, so another edit opens it again; the window's `Esc.menu`, the web's `data-esc`); Tab/Enter/click complete as for skills. Laws `slash_*`; test `test/slash_test.bend`.
43
43
-`src/core/links.bend`: links in a message (pure: web addresses, bare or `[label](url)`, and paths to files, bare, in backticks or as a markdown target, with an optional `:12`/`#L12`; `Link.pieces`, `Link.is_path`; laws `link_*`). A link that is not a web address is a file's: a click asks the hub to open it on its machine (`file-open` → `file.open {path, how}`, the hub's `FileJob` runs `Link.file.cmd`: the system opener, or "reveal" through the desktop's FileManager1, Finder on a Mac), a right-click (a tap on phones) opens its menu (client.bend's `Menu.file`, `@menu``f:<path>`: Open, Show in folder, Copy path; `file-menu`, `file-reveal`, `file-copy`). A relative path is in the thread's folder (`Flink.abs`, `Link.file.abs`). Tests: `test/links_test.bend`, `test/sidebar_test.bend`.
44
44
- Markdown: one parser for all four clients, `Md.render` in `src/web/dom.bend` (paragraphs, headings, lists, ordered lists keeping their numbers (`li value`), blockquotes, rules, fenced code, tables (a `|---|` row makes the first row the head: `Md.headed`), inline code, bold, italics, links; laws `md_*`, test `test/md_test.bend`). The web writes its nodes; phones get them as JSON (`Mob.nodes`, an item's number as `n`) and draw them natively (`Markdown.swift`, `Markdown.kt`: a table is a grid, columns as wide as their widest cell up to 240, scrolling sideways); the window lays them out as lines (layout.bend's `TL.block`: a table as kind 18/19/20 lines, each column as wide as its widest cell, the wide ones shrunk to the panel, cells wrapped; quotes kind 22, rules 21).
45
-
-`src/core/fold.bend`: runs of tool calls folded into one row (pure: groups, labels, per-entry roles; open state is `fold:<first id>` in the Ui info map, the "fold" action; laws `fold_*`). The window applies the roles each frame over the memo (`TL.entries.mr`, kind 14 lines), the web in `View.entries`. Test: `test/fold_test.bend`.
45
+
- `src/core/fold.bend`: runs of tool calls folded into one row, a drawer shut until the person clicks it, running or not (pure: groups, labels, per-entry roles; open state is `fold:<first id>` in the Ui info map, written only by the "fold" action and a history jump, `Fold.reveal`; `Fold.run.open`, laws `fold_run_*`). The live run (the last thing while its turn runs, `RHead`'s `live`) reads "5 tool calls · running: Bash" (`Fold.label.live`). The window applies the roles each frame over the memo (`TL.entries.mr`, kind 14 lines), the web in `View.entries` (head `View.fold.row.live`, classes `fold open live`), the phones in `Mob.entries` (`live` on the row). An open run's rows name their run (web `data-run`, `View.run.mark`; phones `run`, `Mob.run.mark`) so the hub-drawn page's kept history (timeline-history.bend's `H.shut`) and the phones' (thin-native-host's `projectHistory`) drop them once it is shut. Tests: `test/fold_test.bend`, `test/timeline_history_test.bend`, `node test/tools/native_thin_bridge_307265.mjs`.
46
46
-`src/core/edit.bend`: text editing for the window's fields (word and line motions, ranges, undo history); `nui.bend`'s `Ed` maps keys onto it. The composer moves by the lines it shows: Up/Down and a press or drag in it leave a request in the scratch (`@cq`, nui.bend's `Cq`) that main.bend places after each event with the font (`Comp.pend` in layout.bend, over `Edit.starts`). Test: `test/edit_test.bend`. Thread text selection is `TSel` in `layout.bend` and `Sel.*` in `nui.bend` (test `test/select_test.bend`).
47
47
- One hub per home: a hub holds an exclusive flock on `<home>/hub.lock` for its whole life (server.bend's `Lock.*`, `src/server/hublock.bend` + `effects/hublock.js`, pure answers in `src/core/onehub.bend`, laws `onehub_*`), taken before anything touches the event store; the file says `<pid> <port> flock`. The kernel drops the lock when the process dies (SIGKILL too), so a stale file blocks no one; the descriptor is close-on-exec, so no child holds it, and a restart in place hands it over (the host's `Sys.exec`; the new image takes it back from `BACKPLANE_HUB_LOCK_FD`). A window started while one runs for the same home joins it over its port (main.bend's `Start.hub`; the address is the client's `local.hub`, and a dropped link is tried again); `--headless` and `backplane-serve` print "a hub already serves <home> (pid P, port N)" and exit 1. A file without `flock` is an older hub's, believed while its pid lives (`Lock.find.sh`). Two hubs on one log each kept their own state, so what one client sent never reached the others. End to end: `bun test/tools/onehub_e2e.ts [BINARY] [WIREDIR]`.
48
48
- The command line is strict (`src/core/cli.bend`, `Cli.of`, laws `cli_*`, test `test/cli_test.bend`), checked first in both mains before any other IO: the hub's flags are `--home DIR --port N --host ADDR --web DIR --no-tailscale --tailscale --tailscale-https --headless --foreground`, and the children's (`--review`, `--plot`, `--plot-tree`, `--plot-info`, `--render`) come first. An unknown flag, a word, or a flag without its value prints the usage to stderr and exits 2; `--help`/`-h` prints it and `--version` the version, exit 0. None of them opens the home, binds a port or opens a window. A new flag goes into `Cli.kind`.
0 commit comments