Skip to content

feat(launchpad): build widget-calculated-fields - #1254

Merged
rubenvdlinde merged 1 commit into
developmentfrom
quality/build-widget-calculated-fields
Nov 17, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
quality/build-widget-calculated-fields

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Continues widget-calculated-fields after #1246 merged.

Tasks done

  • Task 21: WidgetPlacement gets a nullable calculatedFields JSON column with getCalculatedFieldsArray() / setCalculatedFieldsArray(). NULL, unparseable values and non-lists read as []; entries that are not field objects are dropped. The list goes out on the wire as calculatedFields, and a placement update with a calculatedFields list replaces the stored one (RequestDataExtractor, PlacementUpdater).
  • Task 22: Version002016Date20261117000000 adds calculated_fields (TEXT, nullable) to launchpad_widget_placements once. Existing rows keep NULL, which reads as [], so no row is rewritten and a revert loses no data. The app version is raised so the migration runs.

Tasks left, and why

  • 23–25, 37, 40: the server-side validateAndCompile (a PHP AST type check), wiring validation into create/update, and the 400 envelope. This needs the stored fields from this PR first.
  • 26–29, 32, 39: server-mode materialisation into OpenRegister computed-fields, cleanup on delete, and the downgrade logic.
  • 19, 20, 35: renderer integration (error cell, export/drill-down, formatting at render time).
  • 41, 47–49, 52, 53: the parser test expansion, strict-check/eslint sweep, OpenAPI/i18n/docs and the gates once the code tasks are in.
  • 44–46: Playwright/live tasks. They need a running instance, so they are left unchecked.

Tests

  • New: WidgetPlacementCalculatedFieldsTest (5 tests, round-trip, safe reads, update path) and CalculatedFieldsColumnMigrationTest (3 tests). Each was checked by breaking its subject line and watching it fail.
  • Updated for the new wire field: RequestDataExtractorTest and WidgetPlacementSerializeGoldenTest. The mapper and add-widget golden fixtures were re-recorded; the only difference is "calculatedFields":[].
  • PHPUnit before: 4516 OK, 13 skipped. After: 4524 OK, 13 skipped. php -l, phpcs (no errors) and phpstan are clean on the touched files.

Generated by Claude Code

Tasks 21 and 22: widget placements store their calculated fields as a JSON list in a new nullable calculated_fields column (NULL reads as []), carry it on the wire and accept it on a placement update; the migration adds the column once. Goldens re-recorded for the new wire field.

Assisted-by: ClaudeCode:claude-opus-5-5
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