Skip to content

fix(c4-zoom): close the C4 zoom navigation review gaps - #1707

Merged
github-actions[bot] merged 17 commits into
mainfrom
claude/c4-zoom-gaps
Nov 10, 2026
Merged

github-actions[bot] merged 17 commits into
mainfrom
claude/c4-zoom-gaps

Conversation

@JSdotNet

Copy link
Copy Markdown
Owner

Summary

Closes the C4 zoom navigation review gaps, entries 21–27 of plan +c4-zoom-navigation. All changes sit behind the c4-zoom flag. The classic C4 tab's SVG is byte-identical.

Entry Change
21 The C4 catalog stamps the size and write time of every input it reads: workspace.dsl, c4/, _c4/references.json, and the chapters. A file added, changed or removed outside the app makes the catalog read again. The stamping code (C4DevbookInputs) lives in Infrastructure, because a module UI may do no file IO.
22 TDRs show their Origin/Related decision chain, and guideline ADRs are included. One origin reader (C4RecordPlacement.OriginDecisions) is shared by the panel, the inspector and the dynamic steps.
23 The inspector now matches the design: arc42-only DocumentedIn, the tally with Show all, the On-component roll-up, and the debt card. Escape clears the selection without closing the takeover, and focus is handled.
24 The Code view has a Technical debt section with a component fallback, a −/Fit/+ scale (C4ZoomScale), and a scale reset per component.
25 The overlay switch moves into the top row. An empty selection shows a view summary. The decision log gets an All/Accepted/Proposed filter. The dynamic steps show the decisions on the current path.
26 Nested deployment nodes are framed. Landscape bands sit beside the system. Gaps are wider. All of this applies to the zoom view only.
27 Under reduced motion, Play still advances without animating, and a change to the media query mid-session is followed.

Evidence

  • dotnet build Backlog.WithoutAppHeads.slnf -c Release -warnaserror --no-incremental: 0 warnings, 0 errors, after merging main.
  • Tests: UI.Components 4751/4751, Desktop.UI 5943/5943, Architecture 897/897.
  • Review: two rounds. Round 1 had 12 findings, and round 2 fixed four QA defects:
    • Escape closed the takeover;
    • the filter was clipped;
    • the Open TDR button was unstyled;
    • the rail listed context-map.
  • Browser QA in the desktop harness with flags c4-diagrams and c4-zoom: pass 2 passed scenarios A–D.
  • Personal Validation: approved.

Merge Danger

Two-way door, flag-gated. Blast radius: the Devbook Architecture surface and the shared C4 components in Backlog.UI.Components/Diagrams/C4. The classic C4 layout is held unchanged by option defaults.

Known and not done:

  • "Held to a reference" has no data source in the product yet.
  • Labels can still overlap where many lines meet.
  • The dynamic-view inspector sits below the steps panel.
  • At the Code level, Fit draws at natural size.

The companion docs PR adds the building block that makes the Code level reachable here.

🤖 Generated with Claude Code

JSdotNet and others added 17 commits November 9, 2026 22:18
A building block, ADR or workspace.dsl added, changed or removed outside the
app (git pull, an editor) was not seen until a feature switch toggled: the
C4 catalog was cached per scope and dropped only on folder-setting, feature
or in-app save changes. Each load now stats the files the catalog was read
from (C4DevbookInputs) and re-reads when they moved: a chapter-only change
relinks over the parsed workspace, as a chapter save does; a change to the
workspace, its c4/ includes or _c4/references.json drops it whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A TDR opened with c4-zoom on now shows its decision chain: the ADRs its
related: names, split into Origin (those its ## Origin section cites) and
Related. Guideline ADRs under adr/guidelines/ now take part in the chain
(builds on, built on by, a TDR's origin and related), marked on the chip
and in its accessible name, since they number from 0001 like local ones.
Supersession stays local-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Code level's type panel now shows what the design's Code screen shows
beside the path, Open in editor and the decisions:

- Technical debt: the debt records whose title names the type, else the
  component's, said to be the component's. The host reads the component's
  TDRs (c4 / c4-touches) and pairs a record with a type by name.
- Held to a reference, for a type the host names one for.
- The − / Fit / + the other levels have, as a reusable C4ZoomScale.

On the surface the level's type panel is the right-hand column: the
component inspector stands down while it is open; the host navigation and
find field stay beside it, as on every level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…em, widen the zoom layout

Zoom-tab-only layout options; the C4 tab passes none and its SVG output is
byte-identical for every view of .devbook/arc42/workspace.dsl.

- C4LayoutOptions.NestedDeploymentNodes: every deployment node a card sits in
  is framed, nested outer-first (two to a row when a frame holds frames), so a
  node holding only nodes (Windows PC, Azure) is drawn and selectable.
- C4LayoutOptions.BandsBeside: group bands without a person take no row; they
  stack in one column right of the cell they relate to most, as the design's
  Landscape draws them.
- A band line whose relationships differ is labelled "n relationships".
- C4LayoutOptions.ColumnGap/RowGap; the zoom tab asks for 80/144.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "Documented in arc42" lists only the arc42 folder's chapters; the views
  map's domain context map and any record are left out.
- Decisions: "n accepted · n proposed" tally, the first five listed with
  "Show all n".
- A container lists the debt on its components, "On component <name>";
  debt on the element itself is drawn as the Components screen's card:
  severity, the debt in a sentence, the lifecycle stepper, the preferred
  remediation, the origin decision and "Open TDR n".
- Context view: "Relationships · n" for the selected element and one
  "Records at this level" note in place of two empty record sections.
- Dynamic view: the steps panel and the inspector share the column beside
  the picture (off the surface) or the right-hand column (on it), so the
  inspector no longer wraps under the picture.
- Inspector story states for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, path decisions

- The overlay switch moves from the view heading to a top row above the
  zoom bar on the surface, and stands down while a document or the Code
  level is open.
- With nothing selected the right-hand column is the view summary
  (new C4ViewSummary) as the Landscape screen draws it: kind, a one-line
  count, description, ways in, and the elements to pick from.
- The decision log gains an All / Accepted / Proposed status filter; a
  decision with no stored state counts as accepted (C4LinkedRecord.
  IsAcceptedStatus), which the inspector's tally now shares.
- C4DynamicSteps lists "Decisions on this path", each opening its record.
- Stories for the view summary and the path decisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…session change

accessibility.md's "Function preserved": reduced motion takes the animation
away, never the function. Play now walks every step on its own under
prefers-reduced-motion as without it (the steps already change in place),
and the panel says the steps change without animation.

The preference was read once with no listener. backlogC4Zoom now offers
watchReducedMotion(id, dotnet), a change listener on the media query that
calls the explorer's [JSInvokable] ReducedMotionChanged, and
unwatchReducedMotion(id), called when the explorer is disposed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Devbook

A module's UI project does no file IO (ModuleUiIoTests); the size-and-time
stamp moves to the Devbook adapter project, taking the model's file names
from the store. Also makes the mid-session reduced-motion test async
(xUnit1031 under -warnaserror).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One TDR origin reader: C4RecordPlacement.OriginDecisions, bounded by
  related: and guideline-aware, now feeds the inspector's debt card too;
  guideline links read "Guideline ADR nnnn".
- Arc42DevbookCatalog.IsGuideline / IsLocalDecision replace the three
  private copies.
- The explorer's scale uses C4ZoomScale; no aside at the Code level (the
  :has hide is gone); the steps panel in the aside drops its own box.
- Decisions on this path carry a guideline flag, list local first, and
  use their own chip class.
- Selecting from the view summary focuses the inspector heading; the
  summary's ways in are one per view; the Code level resets its scale
  for another component.
- The cache-hit stat walk in C4DevbookStore runs on the pool.
- The decision-log filter uses the radio ButtonGroup's own look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chapter text for this change lands with claude/c4-zoom-docs-level
through flow-spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Escape on a selected element clears the selection and stops there instead
  of closing the Devbook takeover; Got it on the hint, and an Escape that puts
  the inspector away, hand the focus to the picture's frame.
- The decision-log filter takes the small toggle size and fits the rail,
  wrapping rather than clipping its last segment.
- The TDR card's Open action is the library's small secondary button.
- "arc42 · documents this view" lists arc42 chapters only.
- The Debt placement reads its origin through OriginDecisions; the dynamic
  steps' decision chip shares the inspector chip's rules; the copied walk
  options name each other; using order in C4Devbook.cs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot enabled auto-merge November 10, 2026 00:50
@github-actions
github-actions Bot merged commit 9a6dbae into main Nov 10, 2026
10 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.

1 participant