Skip to content

Make the editor gallery readable and the sample document honest - #203

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3
Oct 10, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-4d94d3

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt in a Claude project thread.

Before: the two graph pictures were rendered so small that the node text could not be read. The side-column crops had three problems:

  • a border sliver down the left edge
  • clipped "Members" and "Settled" panes
  • empty space under the code

The layout-tuning pane was cut in two. The file-menu crop was ragged, and its Path box was an unlabelled field with "Path" trailing after it. The sample document declared its fields as VariableDeclaration, so the generated output was wrong in two places:

  • Go silently dropped step = 1.
  • Python wrote untyped class attributes.

The README linked the gallery as text only.

After: the graph pictures are readable, and every crop ends on a pane boundary. The Go listing fits within its picture, and the layout pane is shown whole. The file menu has a labelled Path box with a hint, and the README shows editing-a-document.png as its preview.

The sample now uses FieldDeclaration. With it, Go and C note each field's default, Python writes count: int = 0, and C#, C++ and JS keep the initialisers. The bare count/step in the method bodies are not changed here: the AST cannot yet say "this instance's field" (#141). The Python caption now says so instead of implying self.count.

Two things are left alone:

  • The see-through popup alpha, which is ThemeProvider's decision.
  • The two spare variadic pins per slot. These are deliberate (AstGraph.SpareVariadicPins).

Filed separately: #202. Rust drops a field's initial value silently when the type has no constructor, while Go and C note it.

How:

  • Gallery (tests/Coder.Editor.UITests/Gallery):
    • GalleryEntry.Display lets an entry use its own display size; the graph pictures use 2560x1440 with GraphSplit 0.66.
    • EditorUnderTest.SideColumn(from, to) crops to the divider positions (PaneBoundary).
    • Each entry sets its pane shares and its crop.
  • App: the Path label change is in CoderEditorApp.
  • Sample: the field change is in NewDocument, and CoderEditorAppTests is updated to match.
  • Testing: Coder.Test passes (1115 tests), and the gallery suite rendered and was checked by eye. PNGs are not committed; the gallery job regenerates them on main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB


Generated by Claude Code

Render the graph pictures on a 2560x1440 display with a wider canvas so
node text is legible, crop the side-column pictures to pane boundaries
(no border sliver, no clipped Members/Settled panes, no empty space under
the code), keep the layout-tuning pane whole, and crop the file menu to
its own edge.

Label the File menu's Path box ahead of the field, with a hint, instead
of a trailing "Path" that read as nothing.

Declare the sample document's fields as FieldDeclaration rather than
VariableDeclaration, so Go and C note their defaults and Python writes
annotated class fields; the bare member references in the method bodies
are #141, which the Python caption now says.

Show editing-a-document.png as the README's preview.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWRBkw7bXdWGzuLpqnCvrB
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit 48cb708 into main Oct 10, 2026
15 checks passed
@matt-edmondson
matt-edmondson deleted the claude/project-thread-4d94d3 branch October 10, 2026 00:42
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