Skip to content

feat(schema): series→season→episode hierarchy fields (0.9.0)#11

Merged
detain merged 1 commit into
masterfrom
feat/series-hierarchy-schema
Jun 9, 2026
Merged

feat(schema): series→season→episode hierarchy fields (0.9.0)#11
detain merged 1 commit into
masterfrom
feat/series-hierarchy-schema

Conversation

@detain

@detain detain commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Extends the media browse contract so clients (server + hub SPA via @phlix/ui) can render TV/anime content as a series → season/specials → episode tree instead of one flat list. This is the schema/contract step; the server API and @phlix/ui changes that consume it land in follow-up PRs.

Changes

  • schemas/media-item.schema.json
    • type enum gains season (alongside series/episode).
    • New optional fields: parent_id (uuid|null), season_number (int|null), episode_number (int|null), episode_title (string|null) — all derived from metadata_json.
  • schemas/library-query.schema.json
    • Documents parentId (fetch a series' direct children), topLevel (return only parent-less items — movies + series), and the pre-existing libraryId scope.
  • src/Schema/SchemaPaths.php — add mediaItem() + libraryQuery() path resolvers.
  • TestsSchemaPathsTest locks the new enum value, hierarchy fields, and scope params.
  • Bump Version::VERSION0.9.0 + CHANGELOG.

Verification

  • phpunit — OK (293 tests, 2569 assertions)
  • phpstan analyze (level 9) — No errors
  • phpcs --standard=PSR12 src/ — clean

🤖 Generated with Claude Code

Extend the media browse contract so clients can render a TV/anime tree
instead of a flat list:

- media-item.schema.json: add `season` to the `type` enum and the optional
  hierarchy fields `parent_id`, `season_number`, `episode_number`, and
  `episode_title` (sourced from metadata_json).
- library-query.schema.json: document the `parentId` and `topLevel` scope
  params (fetch a series' children / return only top-level items) plus the
  pre-existing `libraryId` scope.
- SchemaPaths: add mediaItem() + libraryQuery() path resolvers.
- Lock the new contract with SchemaPathsTest assertions.
- Bump Version::VERSION to 0.9.0 + CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@detain detain merged commit 1a93e1a into master Jun 9, 2026
1 check was pending
@detain detain deleted the feat/series-hierarchy-schema branch June 9, 2026 15:42
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 5 medium · 5 minor

Alerts:
⚠ 10 issues (≤ 0 issues of at least minor severity)

Results:
10 new issues

Category Results
BestPractice 4 medium
CodeStyle 5 minor
Complexity 1 medium

View in Codacy

🟢 Metrics 15 complexity · 0 duplication

Metric Results
Complexity 15
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.40%. Comparing base (ca9107c) to head (57e7b4d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #11      +/-   ##
============================================
+ Coverage     53.22%   53.40%   +0.17%     
- Complexity      353      355       +2     
============================================
  Files            34       34              
  Lines          1084     1088       +4     
============================================
+ Hits            577      581       +4     
  Misses          507      507              
Flag Coverage Δ
phpunit 53.40% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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