Skip to content

fix(detail): the raw manifest editor showed {} for every app and saved to a dead field - #67

Merged
rubenvdlinde merged 2 commits into
developmentfrom
wip/e2e-cleanup-and-decisions
Jul 31, 2026
Merged

fix(detail): the raw manifest editor showed {} for every app and saved to a dead field#67
rubenvdlinde merged 2 commits into
developmentfrom
wip/e2e-cleanup-and-decisions

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

The defect

ApplicationManifestTab.vue seeded its buffer from JSON.stringify(app.manifest || {}, null, 2). Under the versioned model (ADR-002) the manifest lives on the ApplicationVersion, and the Application record carries no manifest key at all — ApplicationsController says so itself: "reading applicationArray['manifest'] directly returns null for every app".

So the integrator-facing raw JSON editor displayed {} for every application, and Save wrote that through obPatchApp({ manifest }) onto a field nothing reads back. Empty on read, dead on write.

This is the same root cause as the Save-as-template defect fixed in #63 — the Application record is not where the manifest lives — now found in a third consumer. The tab loads and saves through /api/applications/{slug}/manifest, which resolves the active version. Note the endpoint asymmetry, which the code comments: GET returns the manifest bare, PUT expects it wrapped in { manifest }. A failed load falls back to the record and surfaces the error rather than blanking the editor.

Credit where due

The defect was diagnosed (not fixed) by whoever wrote the skip on REQ-OBR-005 — a valid edit is PUT to OR and survives a reload, with the evidence spelled out in the skip body. That test is now un-skipped and green: it asserts the editor loads the real manifest (the exact thing that broke), that a valid edit reaches the server, and that it survives a reload — then restores the fixture.

Cleanup

tests/e2e/application-editor.spec.ts is deleted. It was kept as a signpost to this REQ-OBR-005 coverage while that coverage was skipped; now that the replacement runs, the pointer is a second, dead name for the same scenario.

Verification

18 passed / 13 skipped across openbuild-runtime, save-as-template and rbac-403 on the Vue 3 instance. ESLint clean apart from the repo-wide pre-existing n/no-unpublished-import.

…d to a dead field

`ApplicationManifestTab.vue` seeded its buffer from
`JSON.stringify(app.manifest || {}, null, 2)`. Under the versioned model
(ADR-002) the manifest lives on the ApplicationVersion, and the Application
record carries no `manifest` key at all — ApplicationsController says so itself:
"reading `applicationArray['manifest']` directly returns null for every app".

So the integrator-facing raw JSON editor displayed `{}` for EVERY application,
and Save then wrote that through `obPatchApp({ manifest })` onto a field nothing
reads back. Empty on read, dead on write.

This is the same root cause as the "Save as template" defect fixed in #63 — the
Application record is not where the manifest lives — now found in a third
consumer. The tab loads and saves through `/api/applications/{slug}/manifest`,
which resolves the active version. Note the endpoint's asymmetry, which the code
comments: GET returns the manifest bare, PUT expects it wrapped in
`{ manifest }`. A failed load falls back to the record and surfaces the error
rather than blanking the editor.

The defect was diagnosed (not fixed) by whoever wrote the skip on
`REQ-OBR-005 — a valid edit is PUT to OR and survives a reload`; that test is
now un-skipped and green. It asserts the editor loads the REAL manifest (the
exact thing that broke), that a valid edit reaches the SERVER, and that it
survives a reload — then restores the fixture.

tests/e2e/application-editor.spec.ts is deleted. It was kept as a signpost to
this REQ-OBR-005 coverage while that coverage was skipped; now that the
replacement runs, the pointer is just a second, dead name for the same scenario.

Verified: 18 passed / 13 skipped across openbuild-runtime, save-as-template and
rbac-403 on the Vue 3 instance.
…est API

The code half of the previous commit (its `git add` aborted on the deleted
pointer file, so only the deletion landed). Repoints ApplicationManifestTab at
GET/PUT /api/applications/{slug}/manifest and un-skips the REQ-OBR-005
persistence test that the defect had blocked.
@rubenvdlinde
rubenvdlinde merged commit 95c55a3 into development Jul 31, 2026
@rubenvdlinde
rubenvdlinde deleted the wip/e2e-cleanup-and-decisions branch July 31, 2026 21:48
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