Skip to content

CW-01: Wire fold toggle/expand/collapse into present path #980

Closed

Description

@Xuepoo

Priority: P1 | Area: area:ui | Labels: feat,P1,area:ui | Milestone: v0.1.0 | RFC: ui-compositor-gap-analysis.md gap 1; semantic-terminal-rfc.md P1/P2 | Task: unassigned (backlog)

Scope

CommandBlock/FoldState bounded in bitty-rich; add keymap actions + overlay projection + tests

Title

Wire fold toggle/expand/collapse into present path

Source

ui-compositor-gap-analysis.md gap 1; semantic-terminal-rfc.md P1/P2

Size and priority

L / P1

Dependencies

CW-05

Sub-issue of #971. Backlog item CW-01.

Activity

  1. added this to the v0.1.0 milestone on Sep 19, 2026
  2. added
    feat
    P1
    area:ui
    on Sep 19, 2026
  3. Xuepoo commented on Sep 23, 2026

    @Xuepoo
    ContributorAuthor

    Task: CTX-0723 — CLOSE verdict (wired by PR #1312).

    Scope check against the issue (CommandBlock/FoldState bounded in bitty-rich; add keymap actions + overlay projection + tests):

    • Keymap actions: fold_toggle (alias toggle_fold) / fold_expand / fold_collapse parse + canonical in bitty-config, never in defaults (byte-identical discipline), and dispatch through apply_fold_verb to the live fold state.
    • Live target: Runtime::cw_fold_latest resolves the focused view's latest OSC 133 command block fail-closed (None with no marks — no invented target, loud refusal).
    • Overlay projection: cw_fold_projection / plan_present derive visible/hidden id lists per frame from the live state (CTX-0700 ownership + this PR's live mutation path).
    • Tests: cw_uipresent.rs (latest-verbs incl. no-marks None, toggle/expand/collapse cycle) + app intercept test (verbs on marked commands, refusal without marks) + config parse/never-default test. fmt / workspace clippy -D warnings / workspace tests green.

    Follow-up (not silent, out of this scope): renderer row-hiding for folded blocks — the projection exists per frame; the paint skip is render-path work alongside #985.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1area:uifeat

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions