fix: restore Codex app-server compatibility and mobile containment#33
fix: restore Codex app-server compatibility and mobile containment#33nonnil wants to merge 6 commits into
Conversation
|
Warning Review limit reached
Next review available in: 52 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds mobile overflow checks and layout constraints for Moments and Settings, isolates E2E app-server state, patches dependency exports, updates dependency pins, expands Codex reasoning-effort values, and refreshes related test fixtures and expectations. ChangesResponsive verification
Dependency compatibility
Codex model capabilities
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Fixture as E2E fixture
participant Browser
participant Moments as /moments
participant Settings as /settings
Fixture->>Browser: materialize reader and Moment state
Browser->>Moments: load at 390x844
Moments->>Browser: render long source URL
Browser->>Browser: measure horizontal overflow
Browser->>Settings: load mobile settings page
Settings->>Browser: render model selector and cards
Browser->>Browser: compare scrollWidth with clientWidth
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@e2e/cross-device-responsive.spec.ts`:
- Around line 44-58: Update the test "keeps long Moment rows within the phone
viewport" to assert that the fixture’s long Moment content, specifically the
target READER_URL or corresponding Moment row, is visible after navigating to
/moments and before measuring document scrollWidth; retain the existing heading
and overflow assertions.
In `@e2e/settings.spec.ts`:
- Around line 12-50: Update the fixture in the settings viewport test around the
mocked codex model and selection to use a deliberately long, unbreakable model
identifier or displayName that exceeds the phone viewport’s native select width.
Ensure the model option and model.selectOption call both use this same long
value, while preserving the existing overflow assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a79e6869-bb72-438b-b47f-ab9baf9acbdb
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
docs/quality/verification.mddocs/references/design-system/verification.mde2e/cross-device-responsive.spec.tse2e/reader.spec.tse2e/settings.spec.tspackage.jsonpatches/brace-expansion@5.0.8.patchplaywright.config.tssrc/components/moments/MomentBrowse.tsxsrc/components/settings/SettingsPage.tsxsrc/server/e2e/fixture-reader.tssrc/server/translation/types.tstests/server/runtime/process-lease-overlap.test.tstests/server/translation/codex-app-server.test.ts
| test("keeps long Moment rows within the phone viewport", async ({ page }) => { | ||
| await materializeE2eFixture("reader_base"); | ||
| await mutateE2eFixtureState("moment_delete_focus_rows"); | ||
| await page.setViewportSize({ width: 390, height: 844 }); | ||
| await page.goto("/moments"); | ||
|
|
||
| await expect( | ||
| page.getByRole("heading", { name: "Moments", exact: true }), | ||
| ).toBeVisible(); | ||
| const overflow = await page.evaluate(() => | ||
| document.documentElement.scrollWidth - | ||
| document.documentElement.clientWidth | ||
| ); | ||
|
|
||
| expect(overflow).toBeLessThanOrEqual(1); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Assert that the long Moment content is rendered.
This test only proves that /moments has a heading and no document-level overflow. If fixture materialization stops producing the target row, it can still pass without exercising the long READER_URL case. Assert the long URL or Moment row is visible before checking scrollWidth.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@e2e/cross-device-responsive.spec.ts` around lines 44 - 58, Update the test
"keeps long Moment rows within the phone viewport" to assert that the fixture’s
long Moment content, specifically the target READER_URL or corresponding Moment
row, is visible after navigating to /moments and before measuring document
scrollWidth; retain the existing heading and overflow assertions.
| test("keeps settings forms within the phone viewport", async ({ page }) => { | ||
| await page.setViewportSize({ width: 390, height: 844 }); | ||
| await page.route("**/api/settings/codex-models", async (route) => { | ||
| await route.fulfill({ | ||
| contentType: "application/json", | ||
| body: JSON.stringify({ | ||
| models: [ | ||
| { | ||
| id: "gpt-5.3-codex-spark", | ||
| model: "gpt-5.3-codex-spark", | ||
| displayName: "GPT-5.3-Codex-Spark", | ||
| description: "Ultra-fast coding model.", | ||
| isDefault: true, | ||
| defaultReasoningEffort: "low", | ||
| supportedReasoningEfforts: [ | ||
| "low", | ||
| "medium", | ||
| "high", | ||
| "xhigh", | ||
| "max", | ||
| "ultra", | ||
| ], | ||
| }, | ||
| ], | ||
| }), | ||
| }); | ||
| }); | ||
|
|
||
| await page.goto("/settings"); | ||
| const model = page.getByRole("combobox", { name: "Model", exact: true }); | ||
| await expect(model).toBeEnabled(); | ||
| await model.selectOption("gpt-5.3-codex-spark"); | ||
|
|
||
| expect( | ||
| await page.evaluate(() => | ||
| document.documentElement.scrollWidth <= | ||
| document.documentElement.clientWidth | ||
| ), | ||
| ).toBe(true); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a genuinely long option label in the regression fixture.
gpt-5.3-codex-spark and its display name are not long enough to force the native select’s intrinsic width, so the overflow assertion can pass after reverting the containment fix. Add a deliberately long, unbreakable model identifier or display name, then select that option.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@e2e/settings.spec.ts` around lines 12 - 50, Update the fixture in the
settings viewport test around the mocked codex model and selection to use a
deliberately long, unbreakable model identifier or displayName that exceeds the
phone viewport’s native select width. Ensure the model option and
model.selectOption call both use this same long value, while preserving the
existing overflow assertion.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65b4ef28fc
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "max", | ||
| "ultra", |
There was a problem hiding this comment.
Migrate SQLite checks before accepting new efforts
When a catalog exposes max or ultra, the UI and API now accept the value, but every runtime database is still created from drizzle/0011_numerous_arclight.sql, whose app_settings and translation_jobs CHECK constraints only allow through xhigh. Saving either new default or starting a translation with it therefore reaches SQLite and fails instead of restoring compatibility; add and bundle a migration that rebuilds both constraints before recognizing these values.
Useful? React with 👍 / 👎.
| TRAUMA_CODEX_APP_SERVER_SOCKET_PATH: | ||
| ".trauma/e2e/missing-app-server-control.sock", |
There was a problem hiding this comment.
Override the app-server endpoint in E2E
When Playwright is launched from a shell with TRAUMA_CODEX_APP_SERVER_ENDPOINT=unix:///path/to/live.sock, the spawned web server inherits that variable and parseCodexAppServerEndpoint uses its embedded path, completely ignoring this socket-path override. Visiting /settings then reads the user's live auth state, which can make tests such as the setup-cancellation case fail when the account is enabled and defeats the stated isolation; set the endpoint itself to unix:// (or otherwise clear/replace it) in this environment.
Useful? React with 👍 / 👎.
Summary
Verification
Summary by CodeRabbit
New Features
Bug Fixes
Documentation