feat(preview): starting state with clock, size and Hugo output; startedAt; Hugo before the startup sync #366
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/362"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #362
What changes
Preview pane, state
starting(web/src/components/PreviewPane.tsx).center,.center__box,.center__mark): an hourglass mark and the "Starting Hugo…" heading.startedAt, ticking each second ("12 s", "2 min 05 s"). A start time in the future reads 0 s. With nostartedAt(an older harness) there is no clock.formatNumber.output, scrolled to the last line. It uses.preview-output, the one class the crash panel now shares (it was.crash-panel__output).countPagesinpagemanage.ts, next tocountDescendants. It counts nodes whosepathis not empty.GET /api/statusgainshugo.startedAt""before the first launch.muat each launch, so a restart after a crash moves it forward, even within the same second.harness serveordersup.Start, thenstartupSync, then the forge client, then listen.commands/server.go(*serverCommand).RuncallsnewWatcher(l.503) beforec.build()(l.514). An event that arrives during the build waits on the build lock, so a sync that moves the checkout causes a rebuild.Docs:
docs/api.md(GET /api/status),docs/harness.md"Serving",docs/architecture.md"Branch mode".Proof
go vet ./... && go test ./...: green. All four tests below were also run against a real Hugo 0.167.0 extended:TestIntegrationChangeDuringFirstBuildRebuilds: a home template holds the first build on a stalledresources.GetRemote, the content changes mid-build, and the test asserts "Change detected", staterunningwith the new content, and no build error.TestStartedAtPerLaunchTestStartHugoThenSyncLaunchesHugoFirst: a fake hugo has launched by the time the sync logs its first line.TestStatusStartedAtcd web && npm test: 141 files, 3482 tests pass. Covers the clock, a reload continuing fromstartedAt, a future time reading 0 s, the page count, the hint before and after 10 s in en and de, and the output tail.tsc --noEmitandnpm run buildare clean.Notes
.preview-outputstill uses the--gray-900/--gray-200primitives the crash panel used.tokens.csshas no semantic token for a code surface yet, so I did not invent one..center*is copied intostyles.csswith the styleguide's numbers, like the other shared rules there, becausestyles.cssdoes not importcomponents.cssyet..gitignore: Hugo now runs while the startup sync commits, so.hugo_build.lockandresources/exist during the commit. The scaffold's.gitignorecovers both, andPOST /api/git/syncon a running editor already had this exposure.🤖 Generated with Claude Code
[autoland] verdict: pass