Skip to content

fix: restore Codex app-server compatibility and mobile containment#33

Open
nonnil wants to merge 6 commits into
mainfrom
cc/fix-codex-model-efforts
Open

fix: restore Codex app-server compatibility and mobile containment#33
nonnil wants to merge 6 commits into
mainfrom
cc/fix-codex-model-efforts

Conversation

@nonnil

@nonnil nonnil commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • accept current Codex app-server model catalogs, including max and ultra reasoning efforts
  • isolate E2E auth/model discovery from the user live app-server socket
  • contain Settings and long Moment rows at phone widths, with regression coverage and updated verification docs
  • update audited transitive dependencies and preserve minimatch compatibility through a documented Bun patch
  • stabilize the cross-process migration integration test under full-suite load

Verification

  • GIT_CONFIG_GLOBAL=/dev/null mise exec -- bun run verify (178 files, 1767 tests, production build)
  • GIT_CONFIG_GLOBAL=/dev/null mise exec -- bun run test:e2e (123 passed)
  • mise exec -- bun install --frozen-lockfile
  • mise exec -- bun run audit
  • git diff --check
  • live launchd TRAUMA: root, Codex auth, and Codex model catalog endpoints return 200; app-server 0.145.0 reports running

Summary by CodeRabbit

  • New Features

    • Added support for “max” and “ultra” reasoning effort options.
    • Updated the visible model catalog with the latest available model information.
  • Bug Fixes

    • Improved mobile layouts for Moments and Settings, preventing horizontal overflow.
    • Long source URLs now remain within the phone viewport and can scroll independently.
  • Documentation

    • Expanded browser verification guidance for mobile layouts and dependency security review.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@nonnil, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 46944b0e-0da2-4580-9951-287be630883a

📥 Commits

Reviewing files that changed from the base of the PR and between 65b4ef2 and 60054d4.

📒 Files selected for processing (4)
  • src/server/runtime/runtime-lease-coordinator.ts
  • tests/server/psychiatrist/api-routes.test.ts
  • tests/server/runtime/process-lease-overlap.test.ts
  • tests/server/runtime/runtime-lease-test-helpers.ts
📝 Walkthrough

Walkthrough

The 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.

Changes

Responsive verification

Layer / File(s) Summary
Mobile layout and fixture coverage
src/server/e2e/fixture-reader.ts, src/components/moments/MomentBrowse.tsx, src/components/settings/SettingsPage.tsx
Long reader URLs are used by fixtures, while Moment and Settings layouts constrain content within narrow viewports.
Mobile browser checks
e2e/cross-device-responsive.spec.ts, e2e/reader.spec.ts, e2e/settings.spec.ts, docs/references/design-system/verification.md
Playwright tests and verification guidance cover mobile /moments and /settings overflow, long URLs, and long labels.
E2E isolation and test reliability
playwright.config.ts, tests/server/runtime/process-lease-overlap.test.ts
E2E uses an isolated app-server socket path, and the migration overlap test receives a 30-second timeout.

Dependency compatibility

Layer / File(s) Summary
Dependency overrides and module exports
package.json, patches/brace-expansion@5.0.8.patch, docs/quality/verification.md
Dependency pins and a brace-expansion patch preserve callable CommonJS, default ESM, and named exports for existing consumers.

Codex model capabilities

Layer / File(s) Summary
Reasoning-effort contract and catalog
src/server/translation/types.ts, tests/server/translation/codex-app-server.test.ts
Reasoning efforts now include max and ultra, and catalog expectations use gpt-5.6-sol with those 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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main themes: Codex app-server compatibility and mobile layout containment.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cc/fix-codex-model-efforts

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8b13bee and 65b4ef2.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • docs/quality/verification.md
  • docs/references/design-system/verification.md
  • e2e/cross-device-responsive.spec.ts
  • e2e/reader.spec.ts
  • e2e/settings.spec.ts
  • package.json
  • patches/brace-expansion@5.0.8.patch
  • playwright.config.ts
  • src/components/moments/MomentBrowse.tsx
  • src/components/settings/SettingsPage.tsx
  • src/server/e2e/fixture-reader.ts
  • src/server/translation/types.ts
  • tests/server/runtime/process-lease-overlap.test.ts
  • tests/server/translation/codex-app-server.test.ts

Comment on lines +44 to +58
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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Comment thread e2e/settings.spec.ts
Comment on lines +12 to +50
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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +35 to +36
"max",
"ultra",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread playwright.config.ts
Comment on lines +37 to +38
TRAUMA_CODEX_APP_SERVER_SOCKET_PATH:
".trauma/e2e/missing-app-server-control.sock",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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