Repository navigation
feat(channels): label All-feed posts with a topic chip - #218
Conversation
iebb
left a comment
There was a problem hiding this comment.
Reviewed 9e82164 against master 066c2d6 in an isolated credential-free snapshot; both changed-file blobs match. The chip uses the existing topic model/icon and _selectTopic routing only in the aggregate feed; the scoped feed remains unlabelled. 22 focused topic-chip/navigation/parity tests pass, scoped formatting/analyzer and localization/generated/string/registration checks pass, and exact-head Quality CI is green. No new Telegram action or section 1.4 behavior was found.
Before approval/merge, complete .github/pull_request_template.md as required by AGENTS.md: select one Telegram API Terms classification with its explanation, complete the basic-check evidence/checklist, and mark exception checks not applicable for a compliant/unchanged presentation change. The current Problem/Fix/Tests text omits that mandatory declaration. Also describe concrete chip dimensions/spacing/color/routing rather than another client's style as the implementation contract.
Leaving this legitimate improvement open for the missing contribution evidence, not closing/rejecting it. Direct Git fetching is unavailable; no merge, commit, or push was made. The tests are Flutter UI fixtures, not physical-device QA.
The aggregated feed showed every post as an unmarked stream, so posts from different topics were indistinguishable. Render a _TopicChip row above each post when _selectedThreadId == null (with a 10px bottom gap before the sender header): - 20px TopicIconSurface (custom emoji or tinted hashtag tile) + 6px gap + single-line 14px w600 topic name in topic.iconColor ?? AppTheme.avatarColor(topic.name) + optional 4px gap and 12px HeroAppIcons.lock (c.textTertiary) for closed topics, padded 2px vertically inside an opaque GestureDetector (topic-post-chip-<id>). - Tapping routes through _selectTopic(post.topic.id). - Topic-scoped feeds (_selectedThreadId != null) omit the chip because the header already names the topic.
9e82164 to
b8a3cd3
Compare
|
Updated in
|
iebb
left a comment
There was a problem hiding this comment.
Re-reviewed b8a3cd3 against current master f311e34. The earlier missing declaration and concrete-style specification are resolved. The chip adds only the existing topic metadata/icon and _selectTopic routing in the aggregate feed; scoped feeds remain unlabelled. All 28 focused chip/navigation/parity tests pass. Independently adding the new regression tests to unchanged master reproduces the missing-chip failure; the corrected integrated tree passes. Existing master fixes are preserved when integrating this older merge base.
Independently reviewed the actual production diff and affected entry points. The completed contribution template is present; classification is compliant/unchanged, with no Section 1.4 feature or required exception guard. No authentication, protocol/native, storage-schema, release/deployment, or official-build flag path changes. Credential-free snapshots use secrets_example.dart only. The combined intended master tree 6202d9cf8812ed9ca91a39422039a4cfbcee0102 passes all 3,449 unit/widget tests (one existing skip), formatting of 999 files with zero changes, full analysis, 8 locales x 3830 keys / 9 generated locale assets, visible-string and registration checks, and explicit false/true/invalid build-flag tests. Current exact-head Quality is green. Platform evidence here is shared Flutter layout/navigation/selection testing, not native-device QA; no Telegram, real account, deployment, or store action was used.
Change
In a topic chat's aggregated All feed (
_selectedThreadId == null), posts from different topics rendered as an unmarked stream with no topic indicator.This change renders a
_TopicChiprow above each_TopicPostRowin the aggregated feed (followed by a10pxvertical gap before the sender row):Padding(padding: EdgeInsets.symmetric(vertical: 2))wrapping aRow(mainAxisSize: MainAxisSize.min)with a20pxsquareTopicIconSurface(custom emoji or tinted hashtag tile), a6pxhorizontal gap, aFlexiblesingle-lineText(fontSize: 14,fontWeight: FontWeight.w600,maxLines: 1,overflow: TextOverflow.ellipsis), and — whentopic.isClosedis true — a4pxgap followed by a12pxAppIcon(HeroAppIcons.lock, color: c.textTertiary).final tint = topic.iconColor ?? AppTheme.avatarColor(topic.name)applied to bothTopicIconSurface.tintand the labelTextStyle.color.GestureDetector(key: ValueKey('topic-post-chip-${topic.id}'), behavior: HitTestBehavior.opaque, onTap: onOpen)wired to() => _selectTopic(post.topic.id). Shown only when_selectedThreadId == null; a topic-scoped feed omits the chip because the header already identifies the active topic.TopicChatView(lib/channels/topic_chat_view.dart). No new l10n keys (displays the topic's own name).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.
allowTelegramTosViolations(I_DONT_FUCKING_CARE_ABOUT_TOS), disabled in official builds, and available only in an explicitly enabled self-build.Reason and affected Telegram behavior: Presentation-only topic label in
TopicChatViewusing the already-loaded_ForumTopicmetadata and the existing_selectTopicnavigation callback. Introduces no new TDLib requests, modifies no read/typing/online/retention behavior, and does not touch any section 1.4 surface.Basic checks (every PR)
Check each item after verification. If a check is inapplicable, explain why in the evidence below before checking it.
dart format --output=none --set-exit-if-changed lib/channels/topic_chat_view.dart test/topic_post_topic_chip_test.dart(CI Dart SDK 3.12.2 / Flutter 3.44.2,Formatted 2 files (0 changed)).flutter analyze lib/channels/topic_chat_view.dart test/topic_post_topic_chip_test.dart(No issues found!).flutter test --concurrency=4.Commands, results, platform/build/UI evidence, and reasons for inapplicable checks:
~/.cache/dart3122/bin/dart format --output=none --set-exit-if-changed lib/channels/topic_chat_view.dart test/topic_post_topic_chip_test.dart→Formatted 2 files (0 changed)PATH=/tmp/flutter-3.44.2/bin:$PATH flutter analyze lib/channels/topic_chat_view.dart test/topic_post_topic_chip_test.dart→No issues found!PATH=/tmp/flutter-3.44.2/bin:$PATH flutter test -j 1 test/topic_post_topic_chip_test.dart→ 2/2 passed (the aggregated feed labels every post with its topic chip,a topic-scoped feed does not label its posts).showTopicChip: _selectedThreadId == nullreverted inlib/channels/topic_chat_view.dart,the aggregated feed labels every post with its topic chipfails atexpect(find.byKey(const ValueKey('topic-post-chip-1')), findsNWidgets(2))(Actual: _KeyFinder:<Found 0 widgets>);a topic-scoped feed does not label its postsis a negative scope guard that passes in both states by design.python3 tool/check_l10n_strings.py→No visible UI string literals outside lib/l10n.python3 translations/tools/check.py→8 locales x 3826 keys (11 counted): OKpython3 translations/tools/gen_assets.py --check→9 locale assets are up to datepython3 tool/gen_registration_anchors.py --check→ exit 0Section 1.4 exception checks
Not applicable
Agentic reviewer confirmation
Agentic code reviewer only: record this confirmation in the PR review or check these boxes before approval.