Add source-editor generation #97

Merged
eleith merged 8 commits from feat/interactive-generation-ui into main 2026-10-03 15:21:40 +00:00
Owner

Status

Implementation is complete and pushed in eight owner-reviewed commits, through c31dc6ea. No feature changes remain in the local tracked working tree. The owner has reported that manual tests pass; the PR is ready for review, subject to the stack landing order below.

Stack and landing order

  1. #95 — feat/interactive-generation-core → main
  2. #96 — feat/interactive-generation-web → feat/interactive-generation-core
  3. This PR — feat/interactive-generation-ui → feat/interactive-generation-web

Depends on #96 (and transitively #95). Both parent PRs remain open. Land #95 first, then retarget/land #96. After #96 lands, retarget this PR to main; rebase if the parent merge strategy did not preserve ancestry. Retarget this PR before its final merge rather than merging it into the parent feature branch prematurely.

Changes

  • Plain folder/type/title creation with exclusive writes, followed by the source editor. Retire the separate generator page and generation-at-creation flow.
  • Generate selected metadata fields or append body text from an editor dialog. Use the actual unsaved source and apply one isolated, undoable, unsaved document replacement; reject stale results.
  • Compact progress, searchable field selection and attachments. Metadata starts with all fields selected and focuses the picker on open; the default instructions now request adding or replacing fields with accurate information. Reset inputs only after successful application; preserve them on failure/cancel. Restore editor focus after the modal closes.
  • Return a complete validated/merged document over POST SSE. Disconnect ends observation only; accepted work retains concurrency capacity through provider cleanup. No automatic retries or replay.
  • Delegate browser SSE framing to eventsource-parser; retain native EventSource for Preview/Publish. Keep preview UI local rather than sharing a generic progress component.
  • Core APIs are generatePieceFrontmatter, generatePieceBody, and FrontmatterGenerationRequest. Remove the old generation exports and migrate real callers, including the CLI, without compatibility wrappers. CLI options and quiet final-only output stay unchanged.
  • Merge generated metadata with null cleanup; append body text without rewriting existing source. Allow HTTP(S) URLs in draft asset validation, retaining strict stored-piece validation.
  • Resolve asset URLs case-insensitively on Save; prevent concurrent asset overwrites. Keep unsaved editor text on sign-in redirects and Save network/unexpected errors.
  • Configure proxy streaming for generation and remove the obsolete synchronous create/generate timeout workaround.

Reviewed commits

  • f1cf0d80 — prevent concurrent asset overwrites
  • 97cc1238 — add library-backed JSON SSE reader
  • e6e45640 — keep preview progress UI local
  • d8078f50 — add generated-document merge and append helpers
  • ec410928 — allow asset URLs in draft validation
  • d931e3a8 — resolve asset URLs case-insensitively on Save
  • 039bec57 — complete source-editor generation and the coupled API/backend/legacy-flow migration
  • c31dc6ea — default generation to all fields, focus the picker, and refine the instructions

Verification

Final implementation:

  • pnpm lint, pnpm check, pnpm test: pass.
  • Core: 517 tests, 100% coverage.
  • CLI: 93 tests, 100% coverage.
  • Web: 344 tests.
  • Core declarations refreshed; staged whitespace check passed.
  • API/backend and frontend code reviews completed. A pre-existing Save error-page navigation path that could discard unsaved text was addressed before the final gates.

Earlier slices were independently checked against their prospective commits in ignored snapshots. The uppercase HTTPS Save regression fails without the fix and passes with it.

No web/root builds, theme/content build scripts, Docker changes, or live provider calls were performed for these commits. Changesets are included; no release/version bump or tag.

Manual verification

The owner reported: “manual tests pass.” This clears the remaining owner-controlled verification gate. Browser/provider/proxy verification is owner-reported; the automated checks above were run by the assistant.

## Status Implementation is complete and pushed in eight owner-reviewed commits, through `c31dc6ea`. No feature changes remain in the local tracked working tree. The owner has reported that manual tests pass; the PR is ready for review, subject to the stack landing order below. ## Stack and landing order 1. #95 — `feat/interactive-generation-core` → `main` 2. #96 — `feat/interactive-generation-web` → `feat/interactive-generation-core` 3. This PR — `feat/interactive-generation-ui` → `feat/interactive-generation-web` Depends on #96 (and transitively #95). Both parent PRs remain open. Land #95 first, then retarget/land #96. After #96 lands, retarget this PR to `main`; rebase if the parent merge strategy did not preserve ancestry. Retarget this PR before its final merge rather than merging it into the parent feature branch prematurely. ## Changes - Plain folder/type/title creation with exclusive writes, followed by the source editor. Retire the separate generator page and generation-at-creation flow. - Generate selected metadata fields or append body text from an editor dialog. Use the actual unsaved source and apply one isolated, undoable, unsaved document replacement; reject stale results. - Compact progress, searchable field selection and attachments. Metadata starts with all fields selected and focuses the picker on open; the default instructions now request adding or replacing fields with accurate information. Reset inputs only after successful application; preserve them on failure/cancel. Restore editor focus after the modal closes. - Return a complete validated/merged document over POST SSE. Disconnect ends observation only; accepted work retains concurrency capacity through provider cleanup. No automatic retries or replay. - Delegate browser SSE framing to eventsource-parser; retain native EventSource for Preview/Publish. Keep preview UI local rather than sharing a generic progress component. - Core APIs are `generatePieceFrontmatter`, `generatePieceBody`, and `FrontmatterGenerationRequest`. Remove the old generation exports and migrate real callers, including the CLI, without compatibility wrappers. CLI options and quiet final-only output stay unchanged. - Merge generated metadata with null cleanup; append body text without rewriting existing source. Allow HTTP(S) URLs in draft asset validation, retaining strict stored-piece validation. - Resolve asset URLs case-insensitively on Save; prevent concurrent asset overwrites. Keep unsaved editor text on sign-in redirects and Save network/unexpected errors. - Configure proxy streaming for generation and remove the obsolete synchronous create/generate timeout workaround. ## Reviewed commits - `f1cf0d80` — prevent concurrent asset overwrites - `97cc1238` — add library-backed JSON SSE reader - `e6e45640` — keep preview progress UI local - `d8078f50` — add generated-document merge and append helpers - `ec410928` — allow asset URLs in draft validation - `d931e3a8` — resolve asset URLs case-insensitively on Save - `039bec57` — complete source-editor generation and the coupled API/backend/legacy-flow migration - `c31dc6ea` — default generation to all fields, focus the picker, and refine the instructions ## Verification Final implementation: - `pnpm lint`, `pnpm check`, `pnpm test`: pass. - Core: 517 tests, 100% coverage. - CLI: 93 tests, 100% coverage. - Web: 344 tests. - Core declarations refreshed; staged whitespace check passed. - API/backend and frontend code reviews completed. A pre-existing Save error-page navigation path that could discard unsaved text was addressed before the final gates. Earlier slices were independently checked against their prospective commits in ignored snapshots. The uppercase HTTPS Save regression fails without the fix and passes with it. No web/root builds, theme/content build scripts, Docker changes, or live provider calls were performed for these commits. Changesets are included; no release/version bump or tag. ## Manual verification The owner reported: “manual tests pass.” This clears the remaining owner-controlled verification gate. Browser/provider/proxy verification is owner-reported; the automated checks above were run by the assistant.
eleith marked the pull request as ready for review 2026-10-03 15:06:31 +00:00
eleith changed target branch from feat/interactive-generation-web to main 2026-10-03 15:21:33 +00:00
eleith added 8 commits 2026-10-03 15:21:33 +00:00
[web] resolve asset URLs case-insensitively on Save
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
d931e3a85d
[web] generate metadata and body text in the source editor
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-proxy Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
039bec5760
[web] default generation to all fields and focus the picker
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-proxy Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/core Pipeline was successful
ci/woodpecker/push/web-db Pipeline was successful
ci/woodpecker/push/web-jobs Pipeline was successful
ci/woodpecker/push/web-pieces Pipeline was successful
ci/woodpecker/push/web-proxy Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
c31dc6eaff
eleith merged commit c31dc6eaff into main 2026-10-03 15:21:40 +00:00
eleith deleted branch feat/interactive-generation-ui 2026-10-03 15:21:40 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/luzzle#97