Skip to content

refactor(studio): finish metadata/content and export extraction (OSS-341) - #605

Merged
athNdev merged 3 commits into
mainfrom
codex/oss341-studio-followup
Nov 19, 2026
Merged

athNdev merged 3 commits into
mainfrom
codex/oss341-studio-followup

Conversation

@athNdev

@athNdev athNdev commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes the reopened OSS-341 closure items. Exact head: d1235445c27a59331231fc2f80a88ccc595fe5c3 (branch merged with current main; no conflicts). OSS-341 commits: 4c841288 (extraction) and 2a934667 (review fixes), plus the clean merge of origin/main.

What changed

  • Metadata/content extraction — features/modpacks/studio/pack-metadata.ts now owns the project GET, the whole-pack metadata/content PUT, HTTP <status> failures, the empty-baseline MC-version-change rule, content aggregation and the export-tab breakdown. /modpacks/studio/[id] is a composition shell for form state, tabs, dialogs and toasts.
  • Export-selection extraction — features/modpacks/studio/export.ts replaces routes/modpacks/studio/pack-export.ts. Formats/options, exact URL and query encoding, CurseForge 422 dropped-item handling, filenames and the blob handoff are unchanged; the transport is injected, removing the $app dynamic import and making both Studio entry points request-level testable. Old helper tests were moved, not dropped, and strengthened to exact-equality assertions.
  • Explicit malformed persisted JSON — form-codecs.ts adds parseEnvVarsDetailed/parseVolumesDetailed returning the same rows plus a malformed flag; historical wrappers keep their exact row behavior. features/modpacks/persisted-json.ts gives the modpack library an explicit report. Both module dialogs and malformed modpack cards show a non-blocking warning. Blank/whitespace fields mean absent. This is tolerant decoding with an honest report — not validation, repair or rejection.
  • Template defaults vs instance overrides and staged scalar vs immediate/topology saves stay distinct. No generic form engine was introduced.
  • Governing knowledge concept updated in the same commits (knowledge/decisions/module-form-codecs.md); index regenerated by knowledge-lint.

Request equivalence

Request-level tests assert the exact GET (init: undefined), whole-pack PUT (method/headers/JSON.stringify(pack) body), export URL/query order, 422 dropped-item result and generic error text. Valid legacy values are returned verbatim; only malformedness is newly reported.

Verification (at exact head)

  • bun install --frozen-lockfile clean; bun run check 0 errors/0 warnings; bun test --conditions=browser 465 pass / 0 fail; bun run lint clean.
  • go vet ./... exit 0; go test ./... reached 45 packages with zero failures before the harness timeout (no Go source changed in this PR).
  • go run ./cmd/knowledge-lint -root . -fix then plain: 40/40 queries, indexes current (85 concepts after merge).
  • Production static build (vite build, adapter-static) succeeded.
  • Real-browser QA: 7/7 scenarios PASS, 0 page errors against the production bundle served locally with isolated seeded fixtures (no app-module mocks, no live backend, no credentials or private data). Evidence: external audit folder browser-qa-2026-11-19/oss-341-followup/ (evidence.json, run.mjs, screenshots, logs). The single console error is the intentionally seeded CurseForge 422 response.

Independent review

Separate read-only OpenCode review on the configured free model at exact heads 4c841288 and 2a934667, plus the merged head, both VERDICT: APPROVE. Both low findings from the first review were fixed and re-verified. One remaining low, pre-existing note: the malformed modpack tooltip says loader/version metadata "cannot be displayed" even when only one of the two fields is malformed and the sibling still renders; the visible "Metadata unreadable" label remains accurate.

Honest limits

Browser evidence used the production static build served locally with HTTP-level seeded fixtures, not a live backend or a packaged desktop binary. No live feature, release, deploy or private data was touched. No claim of stricter validation or whole-panel/whole-app coverage is made.

Ownership

OSS-341 owns the Studio route files; no OSS-337 generated/adapter seam was edited. No overlap was detected on the merged head; please coordinate before any future edit to web/carbon-panel/src/routes/modpacks/studio/*.

…341)

Extract the remaining cohesive Studio workflows into features/modpacks/studio:
pack-metadata owns the project GET, whole-pack metadata/content PUT, MC-version
change rule, content aggregation and export breakdown; export owns launcher
formats/options, the exact export URL/query, CurseForge 422 interpretation and
the blob handoff with an injected transport. Routes stay composition shells.

Make malformed persisted JSON explicit rather than silent: form-codecs adds
Detailed decoders reporting a malformed flag while historical wrappers keep the
empty-row fallback; both module dialogs and the modpack library surface a
non-blocking warning. Valid values and all outgoing requests are unchanged.
This is tolerant decoding, not validation. Update the governing knowledge
concept and regenerate its index in the same change.
…gs (OSS-341)

Follow-up to exact-head review: treat whitespace-only persisted JSON as an
absent field in both codec seams (rows unchanged), and word the dialog warnings
as a statement about the stored value so they stay accurate after user edits.
Re-verified: bun check/test/lint, knowledge-lint 40/40.
@athNdev
athNdev merged commit fb291ca into main Nov 19, 2026
17 checks passed
@athNdev
athNdev deleted the codex/oss341-studio-followup branch November 19, 2026 13:59
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