# Active work — cross-machine resume ledger **Snapshot: 2026-07-23.** This file records volatile work that has not landed on `main`. Read it after `docs/agent-handoff.md`. Remove completed entries when their PR merges; do not let this become a second permanent backlog. ## Repository authority - Canonical development URL: `https://github.com/levineuwirth/pmacs.git`. This ledger uses the normalized local alias `githubsucks` so its refs and recovery commands are identical on every machine. Remote names are otherwise machine-local: `origin` may name this canonical URL, a release mirror, or something else, and therefore has no authority by name alone. - Canonical base at this snapshot: `githubsucks/main` @ `47581f4` (web grammars HTML+CSS #146 atop the LaTeX Stage 1 #144 / inline-math framing #145 pair and folding Stage 1 #142; protocol v19). - On the transfer source, `origin/main` named a release mirror at `d3fa632` and lagged badly. On the current destination, `origin` names the canonical URL. This difference is why all recovery begins by verifying URLs and normalizing `githubsucks` rather than trusting `origin/main`. - The shared desktop checkout contained unrelated uncommitted work. The branches below were prepared in isolated worktrees; never clean or overwrite the shared checkout to recover them. Start on another machine by inspecting its remotes: ```sh git remote -v git remote get-url githubsucks ``` If the second command says the alias is absent, add it; if it prints a different URL, stop and resolve that collision rather than overwriting an unknown remote: ```sh git remote add githubsucks https://github.com/levineuwirth/pmacs.git ``` Then recover current refs: ```sh git fetch githubsucks --prune git log -1 --oneline githubsucks/main git worktree list git status --short --branch ``` The first command must expose `47581f4` or a newer intentional main. If it does not, stop and repair the remote/fetch configuration. ## Folding Stage 2 lane (Arc 6) — IMPLEMENTED, PR #149 OPEN Stage 1 (the headless fold engine) is MERGED as **#142** (see "Closed since the last snapshot"); this lane carries the Stage 2 (grid/daemon collapse) work off the resulting main. - Portable branch: `githubsucks/folding-tui`; worktree `../pmacs-folding-tui`. - Base: originally canonical `main` @ `c49a8c7`; `main` moved to `47581f4` (#146) during the arc, so the branch carries a **merge** of it. The merge is textually clean but was NOT semantically clean — #146 added three new `Viewport` literals to `src/highlight.rs`'s unit tests and Stage 2 gives `Viewport` a `folds` field — so the carry-over is resolved in the merge commit. Merged rather than rebased so the four framing revisions the review rounds cite by SHA stay reachable. - Framing head: `docs/folding-stage2-framing.md` **rev 4, APPROVED** (`4222ffa`; rev 1 → 4 absorb review rounds 1–3). Numbering continues the parent `Q#FD` scheme from `Q#FD12`. - State: **implemented; PR #149 OPEN, five review rounds so far, awaiting the merge word.** The spine (Q#FD12) is `src/fold_view.rs`'s `VisibleLineMap`, derived per rendered window and per command/event operation and never stored; fold projection is per-frontend (`FrontendView.fold_projection`, Q#FD21). 48 acceptance tests in `tests/folding_stage2_acceptance.rs`, each asserting on the real `paint_frame` cell grid; every behavioral claim bite-verified. No wire schema or protocol change — `FoldState` production (Stage 1) is untouched; the GPU render path is Stage 3. - Review findings that changed the design, worth carrying forward: fold projection must be per-frontend or a simultaneous unfolded GPU session's cursor skips lines it displays (round 2); maps are per-window, and a command's map follows the operation's TARGET window, not the active one (rounds 2–3); crossing folds need merged hidden components, not "outermost containing fold" (round 3); hidden-cursor motion must project the whole POSITION and `set_view_top` must clamp in the setter (round 4); the Lua widening must key on the **post-intercept** edit site, since a managed intercept may relocate the op (round 5). - Next: remaining review rounds → merge word. Stage 3 (GPU) is a separate branch/PR off the resulting main, re-framed in detail after Stage 2 lands. Recovery worktree: ```sh git worktree add --track \ -b folding-tui \ ../pmacs-folding-tui \ githubsucks/folding-tui ``` ## Parked lane: kill-ring browser + persistence - Portable branch: `githubsucks/kill-ring-browser` - Parked framing head: `503c489` - State: framing only, revision 2; no implementation and no PR. - Status: explicitly parked by the user on 2026-07-20. - Its original scout was based on `0efb5cd`. The preserved framing marks this ground truth stale and requires a complete re-scout against the then-current `githubsucks/main` before implementation. - Compile-mode has merged since the original scout, so old “compile-mode in flight” keybinding/touch-set assumptions are not authoritative. Recovery worktree, only when the user un-parks it: ```sh git worktree add --track \ -b kill-ring-browser \ ../pmacs-kill-ring-browser \ githubsucks/kill-ring-browser ``` ## Documentation lane - Portable branch: `githubsucks/handoff-2026-07-20` - Carries synchronized `AGENTS.md` / `CLAUDE.md`, this ledger, the durable handoff refresh, and the keybinding reference correction. - It changes no runtime code. - Review and merge this documentation branch separately; it must not be folded into a feature framing branch. - Now also absorbs both landed arcs: Vterm Stage 1 (#126) and the config registry (#127). Canonical `main` is merged into it up to `2e37c04`, so its diff against `main` is documentation only. ## Closed since the last snapshot - **Web grammars HTML + CSS — MERGED as #146** (`main` @ `47581f4`, 2026-07-23). `.html/.htm/.xhtml` and `.css` highlight off the official `tree-sitter-html` 0.23 / `tree-sitter-css` 0.25 crate query constants (no in-repo overlay), and HTML's `INJECTIONS_QUERY` lights up `