Skip to content

fix: address CodeRabbit review feedback on PR #413#414

Closed
blacksmith-sh[bot] wants to merge 2 commits intomainfrom
fix/coderabbit-followups
Closed

fix: address CodeRabbit review feedback on PR #413#414
blacksmith-sh[bot] wants to merge 2 commits intomainfrom
fix/coderabbit-followups

Conversation

@blacksmith-sh
Copy link
Copy Markdown

@blacksmith-sh blacksmith-sh Bot commented May 5, 2026

PR #413 was already merged before the CodeRabbit review feedback could be applied, so this PR follows up with the legitimate fixes.

How it works:

  • src/utils/performanceShim.ts: adds the no-argument getEntries() overload so the final as typeof performance cast is accurate. Returns the union of mark and measure entries by reusing getEntriesByType. Bun, OTel exporters, and various dev/observability tooling call this and would have thrown TypeError: performance.getEntries is not a function after the shim installed.
  • scripts/dev.ts: makes the React production-mode optimization opt-in. The production NODE_ENV was disabling 15+ dev-only branches (DevBar, doctorDiagnostic, AutoUpdater dev paths, warningHandler, etc.). It now defaults to development and can be re-enabled with CLAUDE_CODE_FORCE_NODE_ENV=production bun run dev for sessions that need the memory optimization.
  • src/services/api/gemini/index.ts: replaces the deep ../../../Tool.js relative import with the src/Tool.js alias per the project's import-path guideline.
  • src/screens/REPL.tsx: drops the unnecessary as any on the getPipeIpc selector so it matches the other call sites in useMasterMonitor and useSlaveNotifications.

Verified locally with bunx tsc --noEmit (zero errors). The remaining CodeRabbit suggestion to add markResourceTiming, eventCounts, and the EventTarget surface to the shim was skipped since no consumer in the codebase calls them and stubbing the full surface goes beyond the minimal fix.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

- performanceShim: add no-arg getEntries() so the 'as typeof performance'
  cast is accurate for callers (Bun, OTel, dev tooling).
- scripts/dev: make production NODE_ENV opt-in via CLAUDE_CODE_FORCE_NODE_ENV
  so dev-only diagnostics (DevBar, doctorDiagnostic, AutoUpdater dev
  branches, etc.) keep working by default.
- gemini/index: switch deep-relative Tools import to the src/* path alias.
- screens/REPL: drop the unnecessary 'as any' on the getPipeIpc selector to
  match other call sites.
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 5, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ccb-863780bf 🟢 Ready View Preview May 5, 2026, 1:24 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

- performanceShim: replace 'as any' on the onresourcetimingbufferfull
  getter/setter and the globalThis install guard with typed intersection
  casts, per the project's TS guideline.
- fileHistory: clarify the MAX_SNAPSHOTS comment so it reflects that
  checkpointing is throttled (cap reduced from 100 to 20), not disabled.
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants