Skip to content

refactor: parse plugin service rows into typed shapes#834

Open
Abdulmumin1 wants to merge 1 commit into
SonicJs-Org:mainfrom
Abdulmumin1:fix/plugin-service-typed-parsing
Open

refactor: parse plugin service rows into typed shapes#834
Abdulmumin1 wants to merge 1 commit into
SonicJs-Org:mainfrom
Abdulmumin1:fix/plugin-service-typed-parsing

Conversation

@Abdulmumin1
Copy link
Copy Markdown

@Abdulmumin1 Abdulmumin1 commented May 18, 2026

Description

Scope: a focused #435 slice that replaces loose plugin-service row/JSON handling with parsed typed shapes at the DB boundary, then updates the plugin settings page consumer to use the new activity shape.

Refs #435

Changes

  • Parse plugin rows, stats rows, activity rows, hook rows, and route rows in PluginService with Zod instead of passing loose DB values through the service layer
  • Add unit coverage for typed plugin parsing, numeric coercion, structured activity details, and invalid settings payload rejection
  • Add a Playwright regression test that saves cache plugin settings and verifies the Activity tab still renders a readable entry

Testing

Unit Tests

  • Added/updated unit tests
  • All unit tests passing

Commands run:

  • npm run type-check --workspace=@sonicjs-cms/core
  • npm test --workspace=@sonicjs-cms/core -- plugin-service.test.ts

E2E Tests

  • Added/updated E2E tests
  • All E2E tests passing

Commands run:

  • npx playwright test tests/e2e/63-plugin-settings-activity.spec.ts --config=tests/playwright.config.ts

Screenshots/Videos

  • None

Checklist

  • Code follows project conventions
  • Tests added/updated
  • Type checking passes
  • No new console errors introduced by this change
  • Full E2E suite passing
  • Documentation updated (not needed)

- Parse plugin DB rows and JSON columns at the service boundary with Zod
- Add unit coverage for typed plugin parsing and invalid settings payloads
- Add Playwright coverage for plugin settings activity log rendering

Refs SonicJs-Org#435

Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>

Signed-off-by: Abdulmumin Yaqeen <abdulmuminyqn@gmail.com>
@Abdulmumin1 Abdulmumin1 marked this pull request as ready for review May 18, 2026 17:35
@Abdulmumin1 Abdulmumin1 requested a review from lane711 as a code owner May 18, 2026 17:35
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