Skip to content

feat(legend): fold pen groups in the sidebar (#139) - #163

Merged
mrcsin merged 1 commit into
masterfrom
catalogue-read-and-group-fold
Oct 30, 2026
Merged

mrcsin merged 1 commit into
masterfrom
catalogue-read-and-group-fold

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 30, 2026

Copy link
Copy Markdown
Member

Problem

With many groups the sidebar runs past the screen and the watched pens scroll out of view. A group's own column, such as semiplot_groups.folded_on_start (Semiteq/SemiBase#18), had no route to the sidebar: the chart read normalised pens with group-name strings, the editor read the stored catalogue on its own, and the sync compared pens only.

What changed

  • One catalogue read, IDataProvider.QueryCatalogueAsync, returns CatalogueRead: the stored catalogue and the normalised pens of the same rows, both statements in one REPEATABLE READ snapshot under the 5 s bound. PenCatalogueSync.Changes emits a read whenever CatalogueRead.Matches finds a stored pen or group changed. The sidebar builds headers from the stored groups. This is the database groundwork of Sync: open editors follow values stored elsewhere #140; the editor that follows reads is planned separately in docs/plans/20261030-editor-follows-reads.md.
  • Each group header has a ghost chevron that folds its rows for the session. Folds are keyed by header name, seeded from folded_on_start the first time a name is drawn, and survive every rebuild. A pick on the chart unfolds a pen folded away; the window's own first pen choice unfolds nothing.
  • The pen editor edits folded_on_start on the selected group.
  • The panel button is renamed Скрыть значения / Показать значения after the columns it hides. A fold-all button sits beside it. Both turn into icons below a 272 px panel.
  • Вид gains Значения в панели, fold-all, Показать все перья and Скрыть все перья. Show and hide all go through one chart method, SetAllPensVisibility, which keeps the picked pen and replans once.
  • Pens now sort by StringComparer.CurrentCulture then id, where the deleted statement sorted by the database collation.
  • The viewer now needs SemiBase#18 or newer; an older schema fails the catalogue read at start (docs/architecture/postgres-instance.md).

Verification

  • dotnet test SemiPlot.slnx: unit 2605/2605, integration 214/214 (Docker).
  • dotnet format --verify-no-changes and dotnet terse clean.
  • Manual smoke over the AppHost stand passed (the Stage B and B2 checklists in docs/plans/completed/20261029-catalogue-read-and-group-fold.md).

Closes #139
Refs #140

Per-task commits before collapse
7a91033 fix(legend): show the top-row tooltip text
c792840 style(tests): address stage B2 comment audit
9147336 refactor(legend): address stage B2 smells
bf8947b fix(ui): address stage B2 review findings
f7f3259 docs(plans): close out the catalogue read plan
f012e08 docs(architecture): document the sidebar top row
40db996 feat(legend): add the top row and ghost chevron
6f6e045 feat(legend): add fold-all and the values toggle
b4ca1ba feat(chart): show and hide every pen at once
9b37c01 docs(plans): plan the sidebar top row and all-pens commands
ff1bbe3 docs(plans): record the exec run and its checks
588fe03 style(catalogue): address comment audit
f5a7c01 refactor(catalogue): address smells findings
677a6e6 fix(catalogue): address review findings
db79f3a docs(plans): close out the catalogue read plan
306c9d5 docs(architecture): document the sidebar group fold
8197978 feat(ui): edit the group fold flag in the editor
62e4d4e feat(ui): fold toggle on sidebar group headers
6730967 feat(ui): fold sidebar groups for the session
1bda2c6 feat(data): write the group folded_on_start flag
e12d12f feat(data): read the group folded_on_start flag
a102d85 refactor(core): emit changed reads, not deltas
dff81bc docs(plans): record the catalogue review decisions
7a53991 refactor(data): split the catalogue row reader from the normaliser
a22bfdd fix(data): address catalogue read review findings
a1a4c57 docs(architecture): state the one catalogue read
71af2b5 feat(ui): apply the whole catalogue delta
378a688 feat(core): add the whole-catalogue delta
016f088 refactor(startup): carry the whole catalogue read
0873c0b refactor(data): one catalogue read on the provider
9dba3c3 docs(plans): add catalogue-read and group-fold plan

🤖 Generated with Claude Code

With many groups the sidebar ran past the screen and the watched pens
scrolled out of view. A group's own column, such as the
folded_on_start flag SemiBase#18 added, had no route to the sidebar:
the chart read normalised pens with group-name strings, the editor
read the stored catalogue separately, and the sync compared pens only.

The catalogue is now one provider read, QueryCatalogueAsync, that
returns the stored catalogue and the normalised pens of the same rows,
both statements in one REPEATABLE READ snapshot under the 5 s bound.
PenCatalogueSync emits a read whenever CatalogueRead.Matches finds any
stored pen or group changed, so a change the normalisation hides and a
group-only change both reach the window. The sidebar builds its
headers from the stored groups. This is the database groundwork of
#140; the editor that follows reads has its own plan.

Each group header gets a ghost chevron that folds its rows for the
session. The fold is keyed by header name, seeded from
folded_on_start the first time a name is drawn, and survives every
rebuild; a pick on the chart unfolds a pen folded away. The pen editor
edits folded_on_start on the selected group. The panel button is
renamed after the values it hides, a fold-all button joins it, both
turn into icons below a 272 px panel, and the View menu gains the
values toggle, fold-all, and show or hide all pens, the last two
through one batch chart method that keeps the picked pen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mrcsin
mrcsin marked this pull request as ready for review October 30, 2026 16:00
@mrcsin
mrcsin merged commit df129f7 into master Oct 30, 2026
2 checks passed
@mrcsin
mrcsin deleted the catalogue-read-and-group-fold branch October 30, 2026 16:05
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.

Sidebar: fold a pen group to its header

1 participant