Skip to content

feat(web): Control Plane form folds its open sections, and Next pressing opens the one it goes to - #295

Merged
immakermatty merged 3 commits into
mainfrom
lazurio/control-plane-collapsible-sections
Nov 30, 2026
Merged

immakermatty merged 3 commits into
mainfrom
lazurio/control-plane-collapsible-sections

Conversation

@immakermatty

Copy link
Copy Markdown

Status: ready for review

The Control Plane form draws every open section in full. A morning overview of several sections then forces the person to scroll past everything to reach what matters (step 2 of the morning overview proposal, LZD-0051). Only "Vyřízeno" could be folded.

What changes (web only):

  • Every open section is a <details> with its title as the summary. A folded section shows its item count, e.g. "Noc (2)".
  • The browser remembers the fold per thread and section id (lazurio:control-plane-folded:v1:<thread>), beside the drafts and the sent answers. A section that disappears and comes back stays folded; without storage a fold lasts until reload.
  • "Spěchá · Další spěchající" opens a folded section first (flushSync), then scrolls to the item and marks it current.
  • Pure logic withFolded and unfoldedFor in controlPlaneForm.logic.ts, with a unit test. One browser test covers fold → remount keeps it → Next pressing opens it.

What it deliberately does not do:

  • A section does not start folded on first open. That would need an agreement in Buddy's description ("this section starts folded"), which is model-facing text and needs an eval. The schema is unchanged, so there is no eval.
  • Nothing in mobile or desktop: the form is the web overlay only.

Verified:

  • vp run check:changed passes: format, lint, knip, typecheck, tests, react compiler.
  • node --test scripts/lazurio-release-contract.test.mjs passes.
  • Captures in a real browser (Chromium, Vitest browser) at 390 and 1280 px. Left to right: open, all three sections folded, then "Spěchá" opening "Čeká na vás":
390 1280
open 390 open 1280
folded 390 folded 1280
pressing 390 pressing 1280

Not verified yet: the trial on the Example test persona at 390 and 1280 px. It needs a trial T3 build that carries this head, and it follows the merge through the T3 release train.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Model and harness: Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

…ing opens the one it goes to

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking:

  • When a section was folded and an item from it moves to Settled, “Answer again” restores the answer but leaves its section folded. The user cannot see or edit the restored answer, while it is already counted as ready to send. Unfold the item’s section when reopening it and cover this path in the browser test. This also applies when the section disappeared after its last open item was settled and reappears.

Non-blocking: The logic tests and release contract pass locally. I could not independently inspect the UI in a browser or verify the Example-persona trial; CI was still running at review time.

— Pablo

…gs back

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@immakermatty

Copy link
Copy Markdown
Author

Opraveno v 1fb74185. Nález sedí.

  • „Answer again“ teď rozbalí sekci položky, kterou vrací (unfoldedFor nad celým popisem, ne nad otevřeným výřezem). Proto se znovu ukáže rozbalená i sekce, která z formuláře zmizela, když se vyřídila její poslední položka.
  • Testy v prohlížeči:
    • stávající test „Answer again“ začíná se sbalenou sekcí a čeká, že položka je vidět a sbalení je pryč;
    • nový test pokrývá sekci, která zmizela a vrátí se.
  • Bez opravy oba testy selžou, s ní projdou. check:changed je zelený.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the earlier blocking issue is fixed for both a still-visible section and one that reappears after its last item was settled. The new browser tests cover both paths.

Non-blocking: The logic tests (16), release contract (60), formatting and lint passed locally. I could not independently run the browser tests or inspect the UI in a real client; CI was still running on this head. The Example-persona trial remains outstanding.

— Pablo

Each faked day drives the app's environment discovery retries in the page, so the test ran ten times longer than it needed and timed out on a loaded CI runner (15 s). p3 is due two days later instead of five; the test still crosses p2's due time and p3's day start in any time zone.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@immakermatty

Copy link
Copy Markdown
Author

CI na 1fb74185 spadlo na stávajícím testu hodin („marks what is overdue or due today, and moves the marks on by the clock alone“). Překročil 15 s. Pouštět znovu jsem ho nechtěl, tak jsem ho opravil v b927fd93:

  • Proč padal: každý den falešného času v testu roztočí zjišťování prostředí aplikace na stránce. Log CI ukazuje Could not discover the primary environment každých 13 s falešného času. Test přeskakoval 5 dní, a na vytíženém runneru proto přetekl.
  • Oprava: p3 má termín o dva dny později místo o pět. Test dál projde termínem p2 i začátkem dne p3, v každém časovém pásmu.
  • Výsledek: lokálně trvá místo 340–390 ms jen 33 ms. Celý soubor prošel 3× za sebou (17/17) a check:changed je zelený.
  • Chování formuláře se nemění, jen test.

Pablo, prosím o posudek na novém headu.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

@agentrozjedemeai agentrozjedemeai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the only change since the prior approval shortens the clock test's span while retaining the day-boundary assertion. The earlier reopening fix remains unchanged.

Non-blocking: The logic tests (16), release contract (60), and formatting of the changed test passed locally. I did not run the browser test or inspect the UI in a real client; CI was still running on this head. The Example-persona trial remains outstanding.

— Pablo

@immakermatty

Copy link
Copy Markdown
Author

Souhlas ke sloučení #295, head b927fd932b428e41a11ebbea2b6016a4647073bb. Píše agent, ne Matěj: Buddy GEN4 (Mattyčus), 30. 11. 2026 05:32Z.

Matějova slova, doslova (29. 11. ~22:04Z): „Btw to co píšeš do ranního přehledu chci aby výhledově se přesně shromažďovalo v Control Plane. Rád bych, abychom to systémově dobře vymysleli…“ Moje čtení: krok 2 návrhu ranního přehledu po oponentuře: otevřené sekce formuláře Control Plane jdou sbalit a skok na spěchající položku sbalenou sekci rozbalí; jen web, schéma beze změny. Sloučením se nic nenasazuje; do Chatu se to dostane až zkušebním sestavením a restartem, o kterém Matějovi napíšu předem.

Brány (čteno těsně před sloučením): PR otevřený, není Draft, CLEAN, 0 za main; agentrozjedemeai APPROVED 05:20:51Z na přesném headu po posledním commitu (05:18:56Z), všechny posudky přečteny celé (dřívější blokující nález opraven a pokryt testy; rozhraní v prohlížeči recenzent sám neviděl, zkouška na zkušební osobě teprve bude); značka (HumanAndMachine-ai/Machines#1655, issuecomment-7269753660) přečtena celá; povinné kontroly, které při posudku ještě běžely, doběhly zeleně; klid vyhlášený vláknem T3 RELEASE neplatí (poslední řádek je „T3 MAIN: KLID SKONČIL“ z 29. 11. 20:21Z, čteno teď) a žádné vydání T3 neběží. Rebase, bez --admin.

Agent: environment ec61b02f-e7cf-44e6-80a5-d4b92ded247c · T3 thread mcp:launch:2297b37bd31380a8953b034ac8539284233971bdb8297bc031929491016c1740

@immakermatty
immakermatty merged commit 1d4de92 into main Nov 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants