https://entire.com/gh/phaseoteam/-/trails/164/changes/Phaseo/164
What changed
For admins, the models page Coming soon filter and the site search now list only unreleased draft models. Before, they listed every hidden model.
apps/web-api/src/routes/account/models.ts:GET /api/account/models/hiddenaccepts?staged=true, which addsstatus = 'draft'to the query. Without the flag the response is unchanged.apps/web/src/lib/query/stagedModels.ts: requests?staged=trueand also keeps onlystatus === "draft"rows itself, so it is correct whichever app deploys first.- Tests cover both sides, plus a patch changeset for
@phaseo/weband@phaseo/web-api.
Why
An admin reported that many models marked End of life appeared under the Coming soon toggle. fetchAdminStagedModels (from the staged-models change on 10-09) set gateway_status: "coming_soon" on every hidden = true model. Most hidden rows are not upcoming:
| Hidden models in prod (10-29) | Count |
|---|---|
| active / available (delisted, e.g. old dated snapshots) | 142 |
| retired (shown as "End of life" cards) | 45 |
| deprecated | 12 |
| disabled (withheld / unknown / retired) | 11 |
| active / unknown | 5 |
| draft (really upcoming) | 7 |
These counts come from a read-only query on prod v2_models, grouped by status and catalogue_status.
How
The filter lives on the server, so admins no longer download ~210 rows they don't need. The client keeps a matching guard. The admin chat picker (fetchServerAdminChatModels, ?includeRoutes=true) still needs hidden non-draft internal models, so it does not send the flag and is unaffected.
Before and after
| Metric | Before | After | Change |
|---|---|---|---|
| Models under admin Coming soon (prod data, 10-29) | 221 | 7 | −214 |
| Retired "End of life" cards under Coming soon | 46 | 0 | −46 |
| Rows returned to the staged overlay | 221 | 7 | −97% |
Method: the "before" figures are the prod counts of hidden = true models, which the old code tagged as coming soon. The "after" figures count hidden = true and status = 'draft'. I worked these out from the data; I didn't measure them in a browser.
Verification
node node_modules/jest/bin/jest.js --runTestsByPath src/lib/query/stagedModels.test.ts src/lib/query/models.test.ts(apps/web): 11 passed. The new case checks that retired, deprecated, delisted and withheld rows are excluded.pnpm exec vitest run src/routes/account/models.test.ts(apps/web-api): 37 passed. A new case checks thatstaged=truesendsstatus=eq.draft, and the existing case checks that no status filter is sent without the flag.pnpm exec tsc --noEmit(apps/web-api): clean.- Not run: the full web typecheck and a visual check in the browser.
Model: Claude Opus 5.5 (effort unknown) · Harness: Claude Code in T3 Code
🤖 Generated with Claude Code
Summary by CodeRabbit
- Bug Fixes
- Admins now see only unreleased draft models in “Coming soon.” Retired, deprecated, delisted, active, and disabled hidden models no longer appear there.
Activity
6Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review | Status | Commit | Review trigger |
|---|---|---|---|
| 📝 Code Review | ✅ Completed 2026-10-29T16:17:36.342831Z | 6ae6c6e | PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Dependency Review
✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
NoneNo actionable comments were generated in the recent review.
Recent review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
ed307aa7-1f40-4d43-b210-8b5b555d19b7
Commits-
Reviewing files that changed from the base of the PR and between 7cf419141310a9d6876ab025b88f9c92a1efed21 and 6ae6c6e3849dbbff91d1ce0914c4ce7b34fcfd48.
Files selected for processing: 6-
.changeset/admin-coming-soon-staged-only.mdapps/web-api/src/routes/account/models.test.tsapps/web-api/src/routes/account/models.tsapps/web/src/lib/query/models.test.tsapps/web/src/lib/query/stagedModels.test.tsapps/web/src/lib/query/stagedModels.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
Walkthrough
-
The hidden-model endpoint now supports filtering for drafts. The admin staged-model query requests that filter and returns only hidden draft models.
Changes: Admin staged model filtering
Layer / File(s) Summary Add staged filtering to the hidden-model endpoint
apps/web-api/src/routes/account/models.ts,apps/web-api/src/routes/account/models.test.tsThe endpoint adds a status = "draft"filter whenstaged=true. Tests check the staged filter and confirm that the default request has no status filter.Request and retain hidden draft models
apps/web/src/lib/query/stagedModels.ts,apps/web/src/lib/query/stagedModels.test.ts,apps/web/src/lib/query/models.test.ts,.changeset/admin-coming-soon-staged-only.mdThe admin query requests staged=trueand keeps only hidden draft models. Fixtures and tests cover model statuses. The changeset declares patch releases for@phaseo/weband@phaseo/web-api.Priority:
Normal Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested labels:
Impact: Low Risk
Merge Risk: Minimal · up to 6ae6c
-
The staged-model filtering change is mergeable with no established blocking risk.
Pre-merge checks: 5
-
Check name Status Explanation Description Check Check skipped - CodeRabbit’s high-level summary is enabled. Title check The title clearly and concisely describes the main change: preventing retired and delisted hidden models from appearing in the admin Coming soon list. Docstring Coverage Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 5 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
- (https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- Mastodon
Comment @coderabbitai help to get the list of available commands.
The latest updates on your projects. Learn more about Vercel for GitHub.