Skip to content

fix(chat): make the formatting panel readable with a bold A button - #282

Merged
iebb merged 1 commit into
masterfrom
fix/composer-format-panel
Oct 30, 2026
Merged

iebb merged 1 commit into
masterfrom
fix/composer-format-panel

Conversation

@iebb

@iebb iebb commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Change

The composer's formatting panel was barely visible. With no text selected, every action was drawn disabled at about 1.4:1 contrast, and the strip button used a generic font icon.

  • Every ink is now a theme token, so light, dark and custom themes all stay readable. Enabled glyphs use textPrimary. Labels and disabled glyphs use textSecondary at full strength. Cell borders use textTertiary, and the selected cell uses the brand accent.
  • The format button is a bold system-font "A" at 20pt, unscaled like its neighbouring icons and in the same colours: grey when closed, accent when open.
  • The text being composed keeps its own colour; formatting actions are unchanged.

Affected platforms: all (shared composer UI).

Related PRs and canonical PR (or None; existing PRs checked): this is the canonical PR for this change. Open and recently closed PRs were checked; none covers it. It ships alongside #281, #283 and #284, which are independent fixes from the same request. Each touches different code and is useful alone.

Telegram API Terms classification

Follow the contribution and agentic review rules. Select exactly one classification and explain it below.

This is an agentic source-code review classification. Every store version must remain compliant with applicable Telegram API Terms; the guarded-source exception does not apply to store distribution or review.

  • Compliant/unchanged: this change complies with applicable Telegram API Terms, preserves Telegram's basic functionality, and does not introduce behavior covered by section 1.4.
  • Section 1.4 exception: the entire feature is guarded by allowTelegramTosViolations (I_DONT_FUCKING_CARE_ABOUT_TOS), disabled in official builds, and available only in an explicitly enabled self-build.
  • Disallowed or unresolved: this PR must not be approved or merged until its classification and implementation are resolved.

Reason and affected Telegram behavior:
Visual styling of an existing composer panel; no Telegram API usage or behavior changes.

Basic checks (every PR)

Check each item after verification. If a check is inapplicable, explain why in the evidence below before checking it.

  • I reviewed the diff for correctness, unintended behavior, secrets, and unrelated changes.
  • Formatting passed, or I recorded why it is inapplicable: dart format --output=none --set-exit-if-changed lib test integration_test test_driver.
  • Analysis passed, or I recorded why it is inapplicable: flutter analyze.
  • Relevant tests passed, or I recorded why they are inapplicable; name the commands and test cases below. Quality CI runs flutter test --concurrency=4.
  • I checked affected build/platform paths and applicable localization/generated files; list the evidence below.
  • I completed the Terms classification above and verified that official builds cannot enable section 1.4 exceptions.

Commands, results, platform/build/UI evidence, and reasons for inapplicable checks:

Section 1.4 exception checks

Not applicable: compliant change, no guarded behavior.

  • All UI, routes, commands, callbacks, background work, TDLib/native effects, and registrations use the compile-time guard; a runtime preference alone cannot enable the feature.
  • With the flag omitted, the feature is absent and ordinary Telegram behavior remains intact, including with old saved settings.
  • With --dart-define=I_DONT_FUCKING_CARE_ABOUT_TOS=false, the feature is absent and ordinary Telegram behavior remains intact.
  • With --dart-define=I_DONT_FUCKING_CARE_ABOUT_TOS=true, the feature works through the guarded entry points in a self-build; I included relevant test and build/UI evidence.
  • Official release, nightly, TestFlight, and store builds keep the flag false and have no option that enables it. All store versions remain compliant with applicable Telegram API Terms.

Guard locations and evidence for each flag variant: Not applicable.

Agentic reviewer confirmation

Agentic code reviewer only: record this confirmation in the PR review or check these boxes before approval.

  • I independently confirmed the Terms classification and inspected all required guards and evidence.
  • Applicable checks and Quality CI pass; no unresolved classification or unguarded section 1.4 behavior remains.

Every formatting action was shown disabled at about 1.4:1 contrast, so
the panel was barely visible. Its inks now come from theme tokens only:
enabled glyphs use textPrimary, labels and disabled glyphs textSecondary
at full strength, cell borders textTertiary and the selected cell the
brand accent, so light, dark and custom themes all stay legible.

The format button in the composer strip is now a bold system-font "A" at
20pt in the same colours as its neighbouring icons. The text being typed
keeps its colour.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T20:15:11.196928Z 23826d8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR review

Head: 23826d8a27b8ecabccf786fa3c56bfd18430989a · master: 73c1d46bb5a726e68c9bef160ccaf72a27725ef1
LLM recommendation: needs_human. This is not a GitHub approval.
Auto-merge: blocked. Only iebb can authorize the current head.

Review unavailable: Free OpenRouter review unavailable (HTTP 429); no paid fallback and no merge.

Remaining gates

  • Waiting for iebb to approve this exact current head.
  • Complete the basic check: Relevant tests passed.
  • Resolve all review threads before auto-merge.
  • master source incomplete: lib/chat/chat_input_bar.dart
  • head source incomplete: lib/chat/chat_input_bar.dart

No PR code runs with the model key or write token. Free-only routing; provider/rate-limit failures never authorize a merge. Existing review findings must be resolved, not hidden by a new recommendation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23826d8a27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +7056 to +7059
/// mirror Icon's: a 1.0 line split evenly keeps the cap height centred.
Widget _formatButtonGlyph(Color color) {
return Text(
'A',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Complete the required test verification before approval

The checklist supplied with this commit explicitly leaves relevant tests unchecked and says flutter test could not run in the authoring sandbox. That explains the missing result but does not establish that testing is inapplicable; the reported simulator checks and combined-tree analysis do not supply the missing test evidence. Run the applicable tests in a supported environment, record the results, and confirm passing Quality CI for the reviewed head before approval. AGENTS.md explicitly requires requesting changes when applicable checks remain unchecked or their evidence is insufficient.

AGENTS.md reference: AGENTS.md:L19-L20

Useful? React with 👍 / 👎.

@iebb
iebb merged commit 4585337 into master Oct 30, 2026
8 of 9 checks passed
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.

1 participant