Skip to content

Fix show author name in last message of pending invites in chat list#668

Merged
pepina-dev merged 2 commits into
masterfrom
fix/chat-list-invites-author
May 18, 2026
Merged

Fix show author name in last message of pending invites in chat list#668
pepina-dev merged 2 commits into
masterfrom
fix/chat-list-invites-author

Conversation

@pepina-dev

@pepina-dev pepina-dev commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Description

I found this tiny bug on chat list tile: before accepted, the prefix of the last message author didn't appear. Once accepted, it was shown correctly.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Tests

How I Tested This

  • Signed up in a same device with 2 accounts (A and B)
  • From B, sent a group chat invite and a a message to A
  • Switched to A
  • Checked in chat list that I saw B's name as prefix in the last message preview.

Screenshots

Before After
before after

Checklist

  • just precommit passes
  • Related issue linked (Closes #NNN)
  • CHANGELOG.md updated (if user-visible change)
  • Screenshots added (for UI changes)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed display of author names in pending group chat invitations—the last message preview now shows who authored the message (e.g., "You:" for your messages or the author's name for others' messages).

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 47b4848f-5451-4aa7-81c1-c8fd66842a2d

📥 Commits

Reviewing files that changed from the base of the PR and between e1686fc and af828e1.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • lib/widgets/chat_list_tile.dart
  • test/widgets/chat_list_tile_test.dart
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test (2/4)
  • GitHub Check: Test (3/4)
  • GitHub Check: Test (4/4)
  • GitHub Check: Test (1/4)
  • GitHub Check: Check
🧰 Additional context used
📓 Path-based instructions (8)
**/*.dart

📄 CodeRabbit inference engine (AGENTS.md)

**/*.dart: Use single quotes for strings in Dart/Flutter code
Enable and respect prefer_const_constructors lint rule in Dart/Flutter code
Enable and respect prefer_final_locals lint rule in Dart/Flutter code
Set line width to 100 characters in Dart/Flutter code
Preserve trailing commas in Dart/Flutter code
Maintain minimum test coverage of 99%; never submit a PR that reduces test coverage
Avoid using // coverage:ignore, // coverage:ignore-line, // coverage:ignore-start, or // coverage:ignore-end to bypass coverage requirements; write tests instead (only exception: truly unreachable code)

Files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
**/*.{dart,rs}

📄 CodeRabbit inference engine (AGENTS.md)

Do not add comments except for code that is really complex or hard to understand

Files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
test/**/*_test.dart

📄 CodeRabbit inference engine (AGENTS.md)

test/**/*_test.dart: Test files should mirror source structure with _test.dart suffix
Use helpers from test/test_helpers.dart in tests: setUpTestView(), mountTestApp(), mountHook(), mountWidget(), mountStackedWidget()
Mock Rust API by extending MockWnApi from test/mocks/mock_wn_api.dart instead of implementing RustLibApi directly
Prefer find.byKey() over find.byIcon() in tests; add keys to icons in widgets and use find.byKey(const Key('icon_name')) in tests
Use valid 64-character hex strings for pubkeys in tests, not dummy values like 'abc' or 'test-pubkey'

Files:

  • test/widgets/chat_list_tile_test.dart
test/**

⚙️ CodeRabbit configuration file

test/**: IMPORTANT: CI enforces coverage regression (coverage must never decrease). It does not enforce a fixed 95% minimum threshold.
Rules:

  • Test files mirror source structure with _test.dart suffix
  • Use helpers from test/test_helpers.dart (setUpTestView, mountTestApp, etc.)
  • Mock Rust API using RustLib.initMock(api: mockApi)
  • Always extend MockWnApi from test/mocks/mock_wn_api.dart
  • Prefer find.byKey() over find.byIcon() for widget testing
  • Use valid 64-char hex strings for pubkeys, not dummy values like 'abc'
  • Tests must be deterministic — no external service dependencies

Files:

  • test/widgets/chat_list_tile_test.dart
lib/widgets/!(wn_)*.dart

📄 CodeRabbit inference engine (AGENTS.md)

Complex reusable widgets should not have wn_/Wn prefix and may contain translations, hooks with Rust API calls, or other complex logic

Files:

  • lib/widgets/chat_list_tile.dart
lib/widgets/*.dart

📄 CodeRabbit inference engine (AGENTS.md)

Screen-scoped widgets extracted from a single screen should be prefixed with the screen name and only used in that one screen

Files:

  • lib/widgets/chat_list_tile.dart
lib/**/*.dart

📄 CodeRabbit inference engine (AGENTS.md)

lib/**/*.dart: Use flutter_screenutil for all size values (padding, margins, gaps, icon sizes, font sizes, border radius, container dimensions) to ensure responsive layouts. Use .w for width, .h for height, .sp for font size/letter spacing, and .r for radius
Avoid StatefulWidget; prefer providers (for shared app-wide state) or hooks (for widget-local state) instead

Files:

  • lib/widgets/chat_list_tile.dart
lib/widgets/**

⚙️ CodeRabbit configuration file

lib/widgets/**: This is a reusable widget.
There are two kinds of reusable widgets:

  1. Design system widgets — simple, presentational widgets that match
    the Figma design system in name and structure. They have Widgetbook
    stories, contain only presentational logic, and do NOT have
    translations or Rust API calls.

    • File MUST be prefixed with wn_ (e.g. wn_filled_button.dart)
    • Class MUST be prefixed with Wn (e.g. WnFilledButton)
  2. Complex reusable widgets — used across multiple screens but contain
    translations, hooks with Rust API calls, or other complex logic
    that makes them harder to display in Widgetbook.

    • These do NOT use the wn_/Wn prefix
    • Example: OnboardingCarousel (used in multiple screens, has
      translations and a page controller inside)

General rules for all widgets in this directory:

  • Use const constructors where possible
  • Use flutter_screenutil (.w, .h, .sp, .r) for all dimensions
  • Avoid StatefulWidget — prefer hooks for local state
  • No comments except for truly complex logic

Files:

  • lib/widgets/chat_list_tile.dart
🧠 Learnings (26)
📚 Learning: 2026-01-05T21:28:05.652Z
Learnt from: untreu2
Repo: marmot-protocol/sloth PR: 22
File: test/screens/profile_keys_screen_test.dart:14-23
Timestamp: 2026-01-05T21:28:05.652Z
Learning: In test mocks for the marmot-protocol/sloth project, allow skipping bounds checking for substring operations when test inputs are controlled and have proven sufficient length (e.g., 'test_pubkey' is always 12 characters). Favor simpler, deterministic mock implementations in such controlled test contexts, but avoid relaxing bounds checks in production code or tests with variable inputs. Apply this guideline primarily to test files under the test/ directory.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-01-07T16:49:18.694Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 33
File: test/screens/chat_screen_test.dart:245-282
Timestamp: 2026-01-07T16:49:18.694Z
Learning: In the marmot-protocol/sloth repository, it is acceptable to use force-unwrapping (!) in Dart test files as an implicit assertion: if a value is unexpectedly null, the test will fail. This guideline applies only to test code under the test/ directory and should not be used in production code.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-01-11T22:43:09.610Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 36
File: test/screens/chat_list_screen_test.dart:74-76
Timestamp: 2026-01-11T22:43:09.610Z
Learning: In Dart tests (e.g., test/screens/chat_list_screen_test.dart and related files), use setUp() to call _api.reset() to clean up StreamController resources. Do not suggest or rely on tearDownAll for this cleanup.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-04-14T03:52:37.716Z
Learnt from: josefinalliende
Repo: marmot-protocol/whitenoise PR: 565
File: test/providers/offline_provider_test.dart:63-177
Timestamp: 2026-04-14T03:52:37.716Z
Learning: In this repository, it’s acceptable to use fixed-time waits for test timing using `Future.delayed` (e.g., `await Future.delayed(const Duration(milliseconds: 10))`) inside test files. During code reviews, don’t recommend replacing these fixed sleeps with event-based or poll-based synchronization when the change is localized to Dart test files under the `test/` directory.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-01-06T01:08:41.552Z
Learnt from: untreu2
Repo: marmot-protocol/sloth PR: 22
File: lib/widgets/wn_warning_box.dart:28-79
Timestamp: 2026-01-06T01:08:41.552Z
Learning: In reviews for the marmot-protocol/sloth repository, avoid suggesting accessibility, design, or general improvements unless they are strictly relevant to the PR description and its stated goals. Focus feedback on the specific PR objectives and requirements; ignore unrelated stylistic or broad improvement suggestions.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-15T14:42:54.111Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 39
File: lib/hooks/use_user_search.dart:47-53
Timestamp: 2026-01-15T14:42:54.111Z
Learning: When using npubFromHex(String hexPubkey) from lib/utils/formatting.dart, it already handles errors internally and returns null on failure. Do not wrap calls to this function in try/catch blocks. Instead, check for a null return and handle accordingly (e.g., treat as invalid hex). This guideline applies to all Dart files in the repository that may call this function.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-16T17:35:32.431Z
Learnt from: untreu2
Repo: marmot-protocol/sloth PR: 43
File: lib/hooks/use_network_relays.dart:155-184
Timestamp: 2026-01-16T17:35:32.431Z
Learning: In Dart/Flutter code, prefer void as the return type for fire-and-forget async functions that are intended to run in the background without blocking the caller. Using Future or Future<void> would allow callers to accidentally await, which could block for long periods. This pattern makes the call fire-and-forget by design. Apply to functions that intentionally should not be awaited; document the intent where appropriate. (Example context: pollRelayStatus in lib/hooks/use_network_relays.dart uses void to prevent callers from awaiting a potentially long-running background task.)

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-19T15:50:56.684Z
Learnt from: erskingardner
Repo: marmot-protocol/sloth PR: 52
File: lib/screens/app_settings_screen.dart:30-40
Timestamp: 2026-01-19T15:50:56.684Z
Learning: Target the Flutter SDK version >= 3.27 across the repo. Since features like Column.spacing and Row.spacing were added in Flutter 3.27, you can safely use them in Dart files (e.g., lib/screens/app_settings_screen.dart) as long as the pubspec.yaml environment specifies Flutter >= 3.27. If needed, enforce this by validating the environment constraint (e.g., flutter, sdk: flutter) in pubspec.yaml.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-29T03:02:34.290Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 100
File: lib/widgets/wn_dropdown_selector.dart:126-139
Timestamp: 2026-01-29T03:02:34.290Z
Learning: Global font-family usage guideline: Since Manrope is configured in lib/theme.dart for both light and dark themes, individual TextStyle declarations should not specify fontFamily: 'Manrope'. During reviews, verify that no TextStyle instances override fontFamily unnecessarily; rely on theme inheritance instead. If a TextStyle must specify a font for a specific case, ensure it is clearly justified and localized, and document why the override is needed. This guideline applies across Dart files in the project (e.g., lib/widgets/wn_dropdown_selector.dart and related components).

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-29T16:02:52.588Z
Learnt from: erskingardner
Repo: marmot-protocol/sloth PR: 129
File: test/widgets/wn_overlay_test.dart:84-91
Timestamp: 2026-01-29T16:02:52.588Z
Learning: In Dart/Flutter code, when constructing widgets inside an already-const context (for example, within a const Scaffold with a child that is a collection of widgets), avoid adding explicit const keywords to the children. The Dart analyzer treats these as implicitly const, and adding explicit const can trigger the unnecessary_const lint. Review test files and general Dart files to ensure you do not redundantly prefix children with const in const contexts; rely on the implicit const behavior instead.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-07T03:58:22.587Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 193
File: lib/services/android_signer_service.dart:13-13
Timestamp: 2026-02-07T03:58:22.587Z
Learning: In Dart files across the repository, retain NIP (Nostr Implementation Possibilities) and MIP (Marmot Implementation Possibilities) protocol reference comments that link code to their specifications. While general guidance discourages extraneous comments, these references improve traceability and maintainability by documenting the protocol context for related implementation details. Keep them in Dart sources (e.g., lib/services/android_signer_service.dart) and ensure they are kept up-to-date.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-11T17:29:43.985Z
Learnt from: untreu2
Repo: marmot-protocol/whitenoise PR: 225
File: lib/screens/app_settings_screen.dart:64-69
Timestamp: 2026-02-11T17:29:43.985Z
Learning: In the whitenoise Flutter app, after deleting all data and resetting auth, use Routes.goToHome(context) instead of Routes.goToLogin(context) because the home screen is the app entry point and will manage authentication routing. Apply this change to navigation calls that should land on the home screen after a data reset or auth reset. Update lib/screens/app_settings_screen.dart and any similar navigation points accordingly.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-18T18:36:13.394Z
Learnt from: untreu2
Repo: marmot-protocol/whitenoise PR: 315
File: lib/screens/edit_group_screen.dart:45-47
Timestamp: 2026-02-18T18:36:13.394Z
Learning: Whitenoise uses automated code formatting through the precommit workflow (just precommit). Do not tweak line wrapping or formatting manually; follow the formatter's output. Run the precommit formatter locally and ensure the code matches its styling decisions, and only deviate if the formatter cannot express the intended style (in which case adjust the code to satisfy the formatter).

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-04-06T09:36:06.726Z
Learnt from: untreu2
Repo: marmot-protocol/whitenoise PR: 553
File: lib/widgets/wn_copyable_field.dart:38-40
Timestamp: 2026-04-06T09:36:06.726Z
Learning: In Dart, `String.operator*` is a valid built-in operator for repeating strings (e.g., `'⬤' * 16`). In code reviews of Dart (`.dart`) files, do not treat expressions like `'text' * n` as invalid syntax and do not recommend replacing them with alternatives such as `List.filled(...).join()`; the operator is supported by `dart:core`.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-05-13T13:46:32.612Z
Learnt from: dannym-arx
Repo: marmot-protocol/whitenoise PR: 656
File: lib/hooks/use_block_actions.dart:3-3
Timestamp: 2026-05-13T13:46:32.612Z
Learning: In marmot-protocol/whitenoise code reviews, do not flag imports that reference FRB-generated bindings under `package:rust_lib_whitenoise/src/rust/...` as private-internals violations. In `rust_lib_whitenoise`, Dart bindings are intentionally generated into `lib/src/rust/`, and `analysis_options.yaml` sets `implementation_imports: false` to suppress the related Dart lint—so `package:rust_lib_whitenoise/src/rust/...` imports are the correct/only way to consume that FRB-generated API.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-05-13T13:46:39.250Z
Learnt from: dannym-arx
Repo: marmot-protocol/whitenoise PR: 656
File: lib/services/foreground_service.dart:13-16
Timestamp: 2026-05-13T13:46:39.250Z
Learning: In this repo (marmot-protocol/whitenoise), `rust_lib_whitenoise` is an FRB-generated Flutter package where the generated Dart bindings are intentionally exposed under `lib/src/rust/` as the public API surface. Do not treat imports like `package:rust_lib_whitenoise/src/rust/...` as breaking package API boundaries in code reviews (the project also sets `implementation_imports: false` in `analysis_options.yaml` to opt into this). Never raise concerns about `src/` imports from `rust_lib_whitenoise`.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-02T21:11:03.835Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 157
File: test/widgets/wn_middle_ellipsis_text_test.dart:11-20
Timestamp: 2026-02-02T21:11:03.835Z
Learning: In widget tests (files matching test/widgets/**/*_test.dart) that use the mountWidget helper from test/test_helpers.dart, you do not need to call setUpTestView(tester) separately before mounting. Rely on mountWidget for necessary setup to avoid redundant setUpTestView calls in these tests. If a test does not use mountWidget, continue using setUpTestView as before.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-02-02T21:11:17.594Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 157
File: test/widgets/wn_copy_card_test.dart:8-16
Timestamp: 2026-02-02T21:11:17.594Z
Learning: In test/widgets/**/*_test.dart, when using the mountWidget helper, you do not need to call setUpTestView(tester) separately because mountWidget performs the necessary setup for widget tests. Rely on mountWidget to prepare the test environment and avoid redundant setUpTestView calls.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-02-05T11:59:09.400Z
Learnt from: erskingardner
Repo: marmot-protocol/sloth PR: 189
File: test/widgets/wn_filter_chip_test.dart:1-3
Timestamp: 2026-02-05T11:59:09.400Z
Learning: In Dart/Flutter test files, Offset is exported by package:flutter_test/flutter_test.dart. If you already import flutter_test, you do not need to import dart:ui for Offset. Ensure there are no conflicting Offset symbols when both imports occur.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-04-28T17:39:39.941Z
Learnt from: pepina-dev
Repo: marmot-protocol/whitenoise PR: 600
File: test/hooks/use_leave_group_test.dart:67-78
Timestamp: 2026-04-28T17:39:39.941Z
Learning: In this repo’s Dart test files under `test/` (e.g., `test/hooks/use_leave_group_test.dart`), it’s acceptable to avoid calling `mockApi.reset()` at the start of `setUp()` when the test suite already manually resets all relevant individual mock fields in `setUp()`. Reviewers should not flag the absence of a `reset()` call as long as every field that could leak state between tests is explicitly reinitialized and the tests are passing.

Applied to files:

  • test/widgets/chat_list_tile_test.dart
📚 Learning: 2026-01-05T20:05:32.918Z
Learnt from: untreu2
Repo: marmot-protocol/sloth PR: 22
File: lib/screens/settings_screen.dart:76-88
Timestamp: 2026-01-05T20:05:32.918Z
Learning: In the Sloth project, tooltips should not be used for UI elements. During code reviews, verify that UI components do not include Tooltip widgets and replace them with accessible alternatives (e.g., long-press hints, labels, or interactive guidance). Apply this guidance across Dart UI files under lib (not just settings_screen.dart) to maintain a consistent design approach.

Applied to files:

  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-09T13:25:18.531Z
Learnt from: josefinalliende
Repo: marmot-protocol/sloth PR: 33
File: lib/services/message_service.dart:14-26
Timestamp: 2026-01-09T13:25:18.531Z
Learning: When errors are presented to users in the Sloth codebase (UI layers such as snackbars, dialogs, toasts), show friendly, user-facing messages instead of raw Rust error messages. Implement a mapping from internal error types or codes to clear, non-technical messages, and surface actionable guidance for end users where appropriate. Avoid exposing internal stack traces or language runtime details; centralize common user-facing error wording in a dedicated utility or service and translate backend errors into concise, helpful UI messages.

Applied to files:

  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-04-06T09:40:41.044Z
Learnt from: untreu2
Repo: marmot-protocol/whitenoise PR: 552
File: lib/screens/profile_keys_screen.dart:71-71
Timestamp: 2026-04-06T09:40:41.044Z
Learning: In this Flutter/Dart codebase, when using flutter_screenutil (e.g., ScreenUtil or ScreenUtil-based sizing like `w`, `h`), do not require scaled units for literal zero values. Specifically, in EdgeInsets (and similar sizing/padding/margin/gap APIs), bare numeric `0` should be allowed (e.g., `EdgeInsets.all(0)`, `EdgeInsets.symmetric(vertical: 0)`, `SizedBox(width: 0)`), because scaling `0` remains `0`. Only flag ScreenUtil violations when a non-zero literal needs to be expressed via `0.w`/`0.h` equivalents; do not flag bare `0`.

Applied to files:

  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-01-05T22:40:27.888Z
Learnt from: untreu2
Repo: marmot-protocol/sloth PR: 22
File: lib/widgets/wn_image_picker.dart:127-143
Timestamp: 2026-01-05T22:40:27.888Z
Learning: In marmot-protocol's Sloth project (lib/widgets/...): image hosting URLs returned by blossom servers are always lowercase (http:// or https://). Do not implement or rely on case-insensitive URL protocol detection in WN image picker code; assume the protocol is lowercase. If URL protocol checks are needed, compare against the exact literals 'http://' and 'https://'. Add tests that assert URLs use lowercase protocols. This guideline applies to all Dart files under lib/widgets that handle image URLs.

Applied to files:

  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-04T10:35:43.112Z
Learnt from: erskingardner
Repo: marmot-protocol/sloth PR: 170
File: lib/widgets/wn_list_item.dart:232-234
Timestamp: 2026-02-04T10:35:43.112Z
Learning: In this repository ( marmot-protocol/sloth ), when writing widget build methods in Dart files under lib/widgets, only extract a local typography variable if context.typographyScaled or context.typography is used multiple times within the same build method. If typography is used only once, keep the inline access to avoid an unnecessary extra line. This guideline helps maintain readability and avoids premature refactoring.

Applied to files:

  • lib/widgets/chat_list_tile.dart
📚 Learning: 2026-02-14T05:09:20.007Z
Learnt from: josefinalliende
Repo: marmot-protocol/whitenoise PR: 260
File: lib/widgets/wn_message_quote.dart:32-88
Timestamp: 2026-02-14T05:09:20.007Z
Learning: In Dart widget files under lib/widgets (matching lib/widgets/**/*.dart), spacing literals such as padding, gap values, and border radii should not be extracted into constants based on josefinalliende's preference. Apply this rule consistently across widget files to improve readability and avoid over-abstracting simple literals.

Applied to files:

  • lib/widgets/chat_list_tile.dart
🔇 Additional comments (3)
lib/widgets/chat_list_tile.dart (1)

142-142: LGTM!

test/widgets/chat_list_tile_test.dart (1)

412-441: LGTM!

CHANGELOG.md (1)

35-35: LGTM!


📝 Walkthrough

Walkthrough

Pending group chats now display message author prefixes. Line 142 in chat_list_tile.dart removes the !isPending guard from prefixSubtitle computation, allowing prefix generation for pending chats with a lastMessage. Two tests confirm "You: " for own messages and "{displayName}: " for other authors.

Changes

Pending Chat Message Author Prefix Display

Layer / File(s) Summary
Pending chat prefix subtitle and tests
lib/widgets/chat_list_tile.dart, test/widgets/chat_list_tile_test.dart, CHANGELOG.md
Removed !isPending condition from prefixSubtitle guard so pending chats display message author prefixes. Added tests confirming "You: " prefix for own messages and "{displayName}: " prefix for other authors in pending group chats; updated changelog.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • dannym-arx
  • cypherpinkdev
  • jgmontoya
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix show author name in last message of pending invites in chat list' clearly describes the main bug fix, but lacks the recommended conventional commit format (type: description).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/chat-list-invites-author

Comment @coderabbitai help to get the list of available commands and usage tips.

@pepina-dev pepina-dev changed the title fix: show author name in last message of pending invites in chat list Fix show author name in last message of pending invites in chat list May 16, 2026
@github-actions

github-actions Bot commented May 16, 2026

Copy link
Copy Markdown

✅ Coverage: 99.39% → 99.39% (0.00%)

History
  • 8df0b98 2026-05-16 06:02:39 UTC — 99.39% (0.00% vs base)
  • 487f919 2026-05-16 06:10:04 UTC — 99.39% (0.00% vs base)

@pepina-dev pepina-dev force-pushed the fix/chat-list-invites-author branch from e1686fc to af828e1 Compare May 16, 2026 06:02
@pepina-dev pepina-dev marked this pull request as ready for review May 16, 2026 06:16

@dannym-arx dannym-arx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@erskingardner erskingardner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚢

@pepina-dev pepina-dev merged commit 406e5ce into master May 18, 2026
9 checks passed
@pepina-dev pepina-dev deleted the fix/chat-list-invites-author branch May 18, 2026 14:34
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.

3 participants