chore: add missing altimate_change markers for upgrade indicator#338
chore: add missing altimate_change markers for upgrade indicator#338anandgupta42 merged 2 commits intomainfrom
altimate_change markers for upgrade indicator#338Conversation
Wrap `UpgradeIndicator` imports and JSX usages in `home.tsx` and `session/footer.tsx` with `altimate_change` markers so they survive upstream merges. Closes #337 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds UpgradeIndicator rendering to two TUI footer routes, extracts and exposes diff parsing via Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Two root causes allowed `altimate_change` marker leaks to go undetected: 1. **Context-line state bug** — `checkFileForMarkers` only processed marker keywords on added (`+`) lines, ignoring context (` `) lines. When existing markers appeared as context lines adjacent to new code, `inMarkerBlock` was never set, causing false negatives. 2. **CI gap** — marker guard only ran on PRs, not on push-to-main. Individual PRs could pass while the combined state of `main` had gaps. Fixes: - Track marker state from both added and context lines in diff parser - Reset `inMarkerBlock` at hunk boundaries to prevent cross-hunk leaks - Extract `parseDiffForMarkerWarnings` as testable pure function - Add `import.meta.main` guard so tests don't trigger CLI side effects - Extend CI marker-guard to run on push-to-main with zero-SHA guard - Add `bun test` step in CI for marker parser unit tests - 21 unit tests covering regression cases and real-world scenarios Reviewed by 6 models: Claude, GPT 5.2 Codex, Gemini 3.1 Pro, Kimi K2.5, MiniMax M2.5, GLM-5. Closes #337 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What does this PR do?
Adds missing
altimate_changemarkers to upstream-shared files that were modified by the upgrade indicator feature (#175). Without these markers, the customUpgradeIndicatorimports and usages would be silently overwritten during the next upstream merge.Files fixed:
packages/opencode/src/cli/cmd/tui/routes/home.tsx— import + JSX usagepackages/opencode/src/cli/cmd/tui/routes/session/footer.tsx— import + JSX usageType of change
Issue for this PR
Closes #337
How did you verify your code works?
bunx turbo typecheck— all 5 packages passbun test— all 214 related tests passbun run script/upstream/analyze.ts— all marker blocks properly closed (143 blocks, 40 files)Checklist
Summary by CodeRabbit