From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: tools@kernel.org
Cc: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [PATCH b4 2/2] review-tui: read native_ansi_color for the trailer overlay header
Date: Fri, 4 Sep 2026 16:59:51 +0200 [thread overview]
Message-ID: <20260904145951.1414701-2-khorenko@virtuozzo.com> (raw)
In-Reply-To: <20260904145951.1414701-1-khorenko@virtuozzo.com>
The review status overlay picks its reverse-video header style off
App.ansi_color, a tri-state that stays None until the theme is
switched at runtime, so it never reflects an ansi theme set via
TEXTUAL_THEME and the header falls back to the wrong style. Read
native_ansi_color instead, with a getattr fallback for Textual
releases that predate the property.
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Assisted-by: claude-sonnet-5
---
src/b4/review_tui/_review_app.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/b4/review_tui/_review_app.py b/src/b4/review_tui/_review_app.py
index e1082e9..da60455 100644
--- a/src/b4/review_tui/_review_app.py
+++ b/src/b4/review_tui/_review_app.py
@@ -924,7 +924,7 @@ from b4.review_tui._modals import (
if has_content:
text.append('\n')
- if self.app.ansi_color:
+ if getattr(self.app, 'native_ansi_color', self.app.ansi_color):
text.append(f' {header} ', style=f'bold reverse {colour}')
else:
text.append(f' {header} ', style=f'bold {ts["surface"]} on {colour}')
--
2.43.0
next prev parent reply other threads:[~2026-09-04 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-04 14:59 [PATCH b4 1/2] tui: fix MissingStyle crash under Textual ansi themes Konstantin Khorenko
2026-09-04 14:59 ` Konstantin Khorenko [this message]
2026-09-15 20:32 ` Konstantin Ryabitsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260904145951.1414701-2-khorenko@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=tools@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox