Skip to content

ci: the example repos are checked at main again - #598

Merged
foxnne merged 2 commits into
mainfrom
ci/examples-main
Oct 19, 2026
Merged

foxnne merged 2 commits into
mainfrom
ci/examples-main

Conversation

@foxnne

@foxnne foxnne commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Part of fizzyedit/plans#5 (plans/ZIG_0_17_PLAN.md): the last step of the Zig 0.17 switch. Merge after fizzyedit/example-app#8. Until that lands, example-app's main is still 0.16, and this PR's "Example repos" check builds main.

What changes

SDK impact

  • None.

Verified

  • scripts/check-fmt.sh clean; bash -n scripts/check-examples.sh.
  • The example repos at main: CI, once example-app#8 is in.

🤖 Generated with Claude Code

Their Zig 0.17 PRs have landed, so check-examples.sh clones each example's default branch, as before the move. The dvui-dev pin's tag, fizzy-sdk-0.2.30-7, is recorded. win32_titlebar.zig takes zig fmt's 0.17 upgrades, which #463 brought in 0.16 form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne marked this pull request as ready for review October 19, 2026 01:14
foxnne added a commit that referenced this pull request Oct 19, 2026
Part of #530

## What changes

A plugin can replace the workbench's home page (logo, New File, Open
Folder) by registering a surface with the keyword `home`
(`sdk.keywords.ide.home`):

```zig
try host.registerSurface(.{ .id = "graphl.start", .title = "Start",
    .keywords = sdk.keywords.ide.home, .draw = drawStart });
```

While its one document pane is empty, the workbench declares a region
named `Home` inside it (`Workspace.drawHome`: `keywords = {"home"}`,
`shows = .one`, `hide_when_empty`). It draws the surface that region
accepts, or its own page when there isn't one. Because the place exists
only while nothing is open, a document opening puts the home away. So
does a restored session landing a few frames after startup, and the last
document closing brings it back. Graphl no longer has to retry
`revealSurface` until the regions exist, or watch for the restore.

### Design note

**(a) A `home` keyword, and a Home place the workbench declares
(chosen).** This reuses the existing seams. Keywords say what a surface
is. A plugin region decides where it goes and when it exists.
Assignments choose between two: an app can call
`host.assignSurfaces("Home", &.{"graphl.start"})`, the same list session
restore and the picker write, and a user can choose in Settings ›
Layout. None of the shape's regions accept `home` (`Fit.none` against
`main`), so a home surface never turns up as a tab in Main. The web
build runs the same statically linked workbench.

**(b) An app setting or `AppInfo` field naming the home surface id.**
The workbench would read it through a new `EditorAPI` member, which
moves the fingerprint. It would also be a second way to say where a
surface goes, beside keywords and assignments, and only an app could use
it: a plugin couldn't offer a home page, and a user couldn't choose
between two.

(a) is narrower and declarative. The boundary's shape doesn't move
(`test-sdk-version` passes unchanged); the only addition is one keyword
preset. The note is also on #530.

Also: `Editor.fizzy_api_vtable` is now `pub`, so the test can drive the
workbench's own `drawHome` through a real `Host`.

## SDK impact

- [ ] None
- [x] Core-only or additive: reaches plugins at the next SDK release. It
adds `sdk.keywords.ide.home`; a plugin on an older SDK can write
`&.{"home"}`. The fingerprint did not move.
- [ ] Fingerprint moved: recorded in `sdk/src/version.zig`,
`sdk_version` untouched, PR labelled `sdk`
- [ ] SDK release: bumps `sdk_version`, lists the `sdk` PRs since the
last `sdk-v*` tag

## Verified

- [x] macOS: the new integration test `workbench: a home surface shows
while nothing is open, and a document puts it away` drives the
workbench's `Workspace.drawHome` inside a pane declared as
`Workspace.draw` declares it. It checks that: with no home surface the
place declines and the built-in page draws; a home surface draws once,
in Home and not in Main; a restored pane listing a document that hasn't
landed keeps the home, and the landing puts it away (drawn nowhere); the
last document closing brings it back; and with two home surfaces the
first shows until `assignSurfaces("Home", …)` picks the other. I broke
one expectation once to confirm the test runs. Gates: `check-fmt` (only
the existing `backend/src/platform/win32_titlebar.zig`, untouched here),
`zig build`, `test`, `test-integration` (80/80 steps), `check-web`,
`test-sdk-version`, `check-tests-reached`, and `check-examples`
(example-app `zig-0.17` + example-plugin `main` via `EXAMPLES_DIR`; the
default `zig-0.17` ref no longer exists for example-plugin, which #598
fixes). I didn't run it in the live app: fizzy registers no home
surface, so its page goes down the unchanged path.
- [ ] Windows:
- [ ] Linux: CI
- [ ] Web: `check-web` only

## Follow-ups

- Shapes without the workbench (`example-app`'s minimal, studio,
endless) have no `Home` place. A shape that wants one declares a region
that takes `home` itself.
- Graphl's start page: switch its keywords to `sdk.keywords.ide.home`
and drop the startup retry and restore watch, once this reaches an SDK
release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@foxnne
foxnne merged commit 2cb928e into main Oct 19, 2026
11 checks passed
@foxnne
foxnne deleted the ci/examples-main branch October 19, 2026 03:31
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