Tint transcript turns in speaker colors for visual distinction#241
Open
alexkroman wants to merge 3 commits into
Open
Tint transcript turns in speaker colors for visual distinction#241alexkroman wants to merge 3 commits into
alexkroman wants to merge 3 commits into
Conversation
The live transcript tinted only the "you:"/"agent:" prefix, and the two colors were near-identical cobolt purples (Cobolt 400 vs 300) that downsampled to the *same* 16-color ANSI slot — so on a basic terminal the whole conversation read as one color and you couldn't tell your turns from the agent's at a glance. Tint the whole transcript line (label + body) in the speaker's hue, and give the agent a contrasting teal (downsamples to ANSI cyan) while "you" keeps the reserved brand purple. The two now stay clearly distinct on any terminal, truecolor or not. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFrwHX8EdECmkNsU8LqJNf
The Ubuntu `lint + typecheck + tests` cells kept timing out at the "System deps (PortAudio + ffmpeg)" step and getting cancelled before the tests ran, which bounced this PR out of the merge queue. Root cause: a plain `apt-get install ffmpeg` pulls a ~100-package / ~94 MB dependency closure, and against a degraded Azure Ubuntu mirror that download overran the job's 15-min timeout. Windows was unaffected (it installs only ffmpeg, in under a minute). Factor the three identical Ubuntu installs into scripts/ci_install_audio_deps.sh that (1) passes --no-install-recommends to drop the optional codec/VA-API/SDL recommends that balloon the payload, and (2) wraps each apt call in a bounded `timeout` + retry so a stalled mirror connection is killed and retried instead of wedging the whole job. Bump the two Ubuntu test jobs from 15 to 20 minutes (matching the Windows job) to give the retry path headroom. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFrwHX8EdECmkNsU8LqJNf
Comment on lines
+27
to
+28
| echo "::warning::apt-get $* failed or stalled (attempt ${attempt}/3); retrying" >&2 | ||
| sleep "$((attempt * 5))" |
There was a problem hiding this comment.
In apt_retry, the warning says 'retrying' even on the 3rd failed attempt, but no retry occurs afterward. This creates misleading failure diagnostics.
Show fix
Suggested change
| echo "::warning::apt-get $* failed or stalled (attempt ${attempt}/3); retrying" >&2 | |
| sleep "$((attempt * 5))" | |
| if [ "$attempt" -lt 3 ]; then | |
| echo "::warning::apt-get $* failed or stalled (attempt ${attempt}/3); retrying" >&2 | |
| sleep "$((attempt * 5))" | |
| fi |
Details
✨ AI Reasoning
The retry loop is bounded to three attempts. When the third attempt fails, the warning text still states that it is retrying, but no further attempt exists and the function immediately proceeds to terminal failure. That makes the status message inconsistent with the actual execution path and can mislead CI diagnosis.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
The bounded retry loop printed the "retrying" warning (and slept) even on the final failed attempt, where no retry follows — misleading CI diagnostics. Guard the warning/sleep on attempt < 3 so the 3rd failure falls straight through to the terminal error. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFrwHX8EdECmkNsU8LqJNf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redesigned the visual rendering of conversation transcripts so that entire speaker turns (both label and body text) are tinted in the speaker's color, rather than just the label prefix. This makes "you:" and "agent:" lines visually distinct at a glance, even on terminals with limited color support.
Key Changes
Theme colors: Introduced a new
AGENTcolor (#14B8A6, teal) to replace the previous secondary accent (Cobolt 300) for agent labels. The teal was chosen specifically to downgrade to ANSI cyan on 16-color terminals, staying clearly distinct from the brand purple used for "you" lines. Previously, both speakers used near-identical cobolt purples that collapsed to the same hue after downsampling.Rendering: Modified
_labeled()inaai_cli/agent/render.pyto apply the style to the entire line (label + body) rather than just the label prefix. This ensures the whole turn reads as a cohesive colored block.Tests: Added
test_human_whole_turn_is_tinted_in_speaker_color()to verify that both the label and body text are wrapped in the speaker's color SGR codes, and that the two speakers render in contrasting hues. Addedtest_you_and_agent_stay_distinct_after_downsampling()to ensure the colors remain visually distinct even after downsampling to 16-color ANSI palettes.Implementation Details
AGENTteal (#14B8A6) was chosen outside the cobolt purple family on purpose: it downsamples to ANSI cyan, which is clearly distinct from the purple/blue that "you" downsamples to, ensuring readability across all terminal capabilities.aai.youstyle retains the brand purple and remains reserved (never reused for diarized speakers).https://claude.ai/code/session_01AFrwHX8EdECmkNsU8LqJNf