Apply CORS only to /api, lazy-init map transition audio, and tighten sidebar smoke checks - #212
Conversation
Deploying network-map with
|
| Latest commit: |
a7a0697
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://94cac801.network-map-dew.pages.dev |
| Branch Preview URL: | https://codex-fix-cors-issue-causing-x21v.network-map-dew.pages.dev |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 (2)
📝 WalkthroughWalkthroughThe PR scopes CORS to API routes and preserves static asset access. It also changes map transition wiring, makes transition audio lazy, removes retired sidebar runtimes, and updates related smoke tests. ChangesAPI CORS scoping
Map runtime hardening
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant main.tsx
participant dualMapTransitionRuntime
participant WebAudioGraph
main.tsx->>dualMapTransitionRuntime: switchMapModeWithTransition(targetMode, control)
dualMapTransitionRuntime->>WebAudioGraph: create and connect transition audio on activation
dualMapTransitionRuntime-->>main.tsx: complete map-mode transition
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82f170ac65
ℹ️ 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".
| assert.doesNotMatch(main, /sidebarWorkspaceControllerRuntime/, "an imperative runtime must not mutate the React sidebar"); | ||
| assert.doesNotMatch(main, /sidebarWorkspacePanelGuardRuntime/, "a second runtime must not manage Finder visibility"); | ||
| assert.doesNotMatch(main, /sidebar-workspace-final-fixes\.css/, "workspace CSS must not hide native sidebar content"); |
There was a problem hiding this comment.
Migrate browser acceptance before retiring workspace tabs
When this removal reaches any pull-request browser workflow, the mandatory acceptance suites still wait for and exercise .occumed-sidebar-workspace-tab elements created only by the retired controller: production-ui-smoke.mjs waits for the tab strip, ci-ui-acceptance.mjs requires exactly one selected tab, and ci-cross-browser-acceptance.mjs switches those tabs. Because the new React sidebar does not render those selectors, the UI smoke, UI acceptance, and hardening browser jobs will time out or fail on every run; update those suites to exercise the native controls as part of this migration.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Motivation
Description
app.use("/api", ...)and add assertions inapi-security-smoke.tsto enforce the API-only policy./favicon.svg) from a disallowed origin to ensure frontend assets remain servable and retain their content type inci-api-integration.mjs.HTMLAudioElementinstead of constructing it at module load, move audio graph creation toensureAudioGraph(audio), and exportswitchMapModeWithTransitionfromdualMapTransitionRuntime.ts.switchMapModeWithTransitionfrommain.tsxand replace the previous direct engine-switching handler with a transition-aware handler ininstallMapModeSwitching.sidebar-workspace-hardening-smoke.ts) to assert the native React sidebar is rendered and that legacy imperative sidebar runtimes/CSS imports have been removed.Testing
api-security-smoke.ts) which validate CORS placement and route policy assertions; assertions were updated and verified to pass.ci-api-integration.mjs) including the new static asset fetch and CORS assertions; the integration checks passed.startup-hardening-smoke.ts,sidebar-workspace-hardening-smoke.ts,runtime-ownership-smoke.ts) to confirm lazy audio behavior, React sidebar ownership, and runtime registrations; all smoke assertions passed.Codex Task
Summary by CodeRabbit