Skip to content

🤖 fix: cap immersive review file context#3384

Open
ibetitsmike wants to merge 6 commits into
mainfrom
mike/immersive-review-context-budget
Open

🤖 fix: cap immersive review file context#3384
ibetitsmike wants to merge 6 commits into
mainfrom
mike/immersive-review-context-budget

Conversation

@ibetitsmike
Copy link
Copy Markdown
Contributor

@ibetitsmike ibetitsmike commented May 25, 2026

Mux working on behalf of Mike.

Summary

Caps immersive review full-file context and renders hunk overlays immediately so large files do not block file switching or composer interactions.

Implementation

  • Loads full-file context in the background while showing hunk-only rendering first.
  • Caps immersive full-file context at 1,500 lines and 256KB.
  • Gates full-file reads by the selected hunk, so nearby hunks still get context even if a later hunk is far away.
  • Counts trailing-newline files consistently with the shell-side line guard.
  • Preserves non-budget file-read failures so transient read errors are retried instead of cached as line-budget misses.
  • Caches loaded full-file context per workspace, file path, and hunk signature, while retrying transient read failures on later visits.
  • Adds byte and line limits to file read script generation.
  • Makes the immersive notes Storybook assertion tolerant of the same note rendering inline and in the sidebar without changing the focused visual state.

Validation

  • bun test src/browser/utils/fileRead.test.ts src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.test.tsx
  • make storybook-run CMD='bun x test-storybook src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.stories.tsx --testTimeout 30000'
  • make static-check (first run hit an eslint process kill, retry passed)

Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: 1737006{MUX_COSTS_USD:-unknown}

Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1208316{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: 1a7dc29ada

ℹ️ 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 thread src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.tsx Outdated
Comment thread src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.tsx Outdated
Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1263891{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1294644{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
Copy link
Copy Markdown

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

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: 835e5e8496

ℹ️ 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 thread src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.tsx Outdated
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1316239{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

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

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: 3ae3a98e3d

ℹ️ 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 thread src/browser/utils/fileRead.ts Outdated
Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1354559{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

Generated with mux on behalf of Mike.

Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `1728864{MUX_COSTS_USD:-unknown}`

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=21.89 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ 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".

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