fix(terminal): skip unavailable inline image previews and dedupe repeated renders#446
fix(terminal): skip unavailable inline image previews and dedupe repeated renders#446konard wants to merge 3 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#445
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughВ файл ChangesОбновление служебного файла
Estimated code review effort: 1 (Trivial) | ~2 minutes Related Issues: Suggested labels: documentation, chore Suggested reviewers: нет предложений Poem: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 3 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 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 |
…ated renders Failed inline image fetches rendered an "unavailable" placeholder box plus four spacer rows, and every re-mention or redraw of the same image path rendered another preview, flooding the web terminal with duplicate boxes. Fetch failures now resolve to null and the preview loop skips them entirely (the clickable path link is unaffected, and failures are not cached so a path printed again after the file appears can still preview). Successfully rendered paths are tracked in a session-level set so each image renders at most once, and the leading line break before previews is written lazily only before the first preview that actually renders, so fully skipped segments leave the output untouched. Refs ProverCoderAI#445
Working session summaryThe PR diff is now scoped to exactly the 8 fix-related files (changeset, six source files, one test file), and the working tree is clean. CI is running on the new head commit This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $12.726597📊 Context and tokens usage:Claude Fable 5: (2 sub-sessions)
Total: (24.1K new + 219.5K cache writes + 5.3M cache reads) input tokens, 56.1K output tokens, $12.726597 cost 🤖 Models used:
📎 Log file uploaded as Gist (2518KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryI'm now waiting on the background job: it will post Status so far:
This summary was automatically extracted from the AI working session output. |
|
Your plan includes PR reviews subject to rate limits. More reviews will be available in 32 minutes. |
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 36.7K cache writes + 365.9K cache reads) input tokens, 6.9K output tokens, $1.480466 cost 🤖 Models used:
📎 Log file uploaded as Gist (3195KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 2)Reason: CI failures detected; Uncommitted changes Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryBoth background jobs are running. I'll report back when the monitor fires — the main job sleeps until 09:16 UTC, posts the re-trigger comment, and polls the CodeRabbit status until it passes. This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 2)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.6K new + 25.5K cache writes + 441.7K cache reads) input tokens, 6.9K output tokens, $1.332605 cost 🤖 Models used:
📎 Log file uploaded as Gist (3757KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 3)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryStatus update — here's where things stand: The only failing check is CodeRabbit, and it's not a code problem. Its status reads "Prepaid credits exhausted — enable usage-based reviews", and when a re-review was requested earlier, CodeRabbit replied that more reviews become available after its rate-limit window resets (~09:14 UTC; it's currently ~08:51 UTC). All 19 real CI checks (Build, Lint, Types, Test, all E2E jobs, final builds) pass on the head commit What I verified this session:
Action taken: I started a background job ( This summary was automatically extracted from the AI working session output. |
|
Your plan includes PR reviews subject to rate limits. More reviews will be available in 22 minutes. |
🔄 Auto-restart-until-mergeable Log (iteration 3)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.6K new + 64.1K cache writes + 499.4K cache reads) input tokens, 7.2K output tokens, $2.174690 cost 🤖 Models used:
📎 Log file uploaded as Gist (4407KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 4)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryThe diff is still scoped to exactly the 8 expected files (one changeset, six terminal-package source files, one test file), matching the issue's two requirements: skip unavailable inline image previews and deduplicate repeated renders of the same image. Nothing further to change in the code — I'll now wait for the background job to re-trigger CodeRabbit and report back when it completes. Status so far:
This summary was automatically extracted from the AI working session output. |
|
Your plan includes PR reviews subject to rate limits. More reviews will be available in 18 minutes. |
🔄 Auto-restart-until-mergeable Log (iteration 4)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 16.1K cache writes + 235.7K cache reads) input tokens, 5.4K output tokens, $0.864554 cost 🤖 Models used:
📎 Log file uploaded as Gist (4907KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 5)Reason: CI failures detected; Uncommitted changes Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryEverything on the code side is verified and in order. Now I'm waiting on the background job to re-trigger CodeRabbit at 09:15:40 UTC (right after its rate-limit window resets) and poll the result. Here's the status so far: Current state:
I'll report the CodeRabbit outcome when the background job completes. This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 5)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 40.4K cache writes + 363.2K cache reads) input tokens, 7.1K output tokens, $1.559095 cost 🤖 Models used:
📎 Log file uploaded as Gist (5586KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Source TZ / Issues
/home/dev/.docker-git/pasted-images/*.pngpaths in the web terminalSummary
inlineImageRenderedPathsset (previously only per-segment dedup existed, so every re-mention/redraw duplicated the preview)writeTerminalInlineImagePreviews(Functional Core) driven by injected writer callbacks (Imperative Shell)Proof of fix
UnavailableTerminalInlineImageи рендерился бокс "unavailable" + 4 строки-спейсера; дедупликация путей была только внутри одного сегмента, поэтому каждое повторное упоминание/перерисовка пути рендерила превью заново.null, и цикл превью полностью пропускает такой путь (неудачи не кэшируются — путь, напечатанный снова после появления файла, всё ещё может получить превью); успешно отрендеренные пути записываются вlifecycle.inlineImageRenderedPathsи повторно не рендерятся; ведущий\r\nпишется лениво только перед первым реально отрендеренным превью.packages/terminal/tests/web/terminal-inline-images-core.test.ts(describe("terminal inline image previews (issue 445)")): unavailable-путь не рендерится, один и тот же путь рендерится один раз через несколько сегментов, ведущий перенос строки пишется лениво и ровно один раз, полностью пропущенный сегмент не трогает вывод. Полный набор terminal-тестов: 20 файлов / 154 теста — зелёные.Requirements Alignment
registerLinkProvider), fetch timeout/size limits — unchanged.Verification
bun x vitest run tests/web/terminal-inline-images-core.test.ts(12 tests) inpackages/terminalbun x vitest runinpackages/terminal— 20 files / 154 tests passedbun run typecheck+bun run buildinpackages/terminalbun run typecheckinpackages/app(re-exports compile against rebuilt dist)bun x biome check src/ tests/inpackages/terminal— cleanbun run lint(eslint via vibecode-linter) crashes at config load time on this environment's Node 20 (eslint-plugin-unicornrequires Node ≥ 22 Iterator helpers); verified pre-existing by running it on an unmodified checkout.