Skip to content

Conversation

@AndreaDiazCorreia
Copy link
Member

@AndreaDiazCorreia AndreaDiazCorreia commented Sep 30, 2025

Changes

UI Improvements:

  • Fixed text contrast issue in chat info tabs where selected tab text (white) was unreadable against green background
  • Changed selected tab text color to dark (#1A1A1A) for better readability
  • Removed button animation to make tab selection instant and more responsive

Testing

  • Verified tab text is now readable in both selected and unselected states
  • Confirmed tab selection is instant without animation delay
  • Validated shared key display matches the encryption key used in chat messages

Status badge

Fixed an issue where the trade information tab in the chat screen displayed incorrect status badges. The tab was showing the original order status instead of the current state, causing canceled orders to appear as "active". Updated the Order model's copyWith method to accept status parameter and modified the chat screen to pass the current orderState.status, ensuring accurate status display across all order states including canceled, disputed, and completed orders.

Before:

image

After:

image

Summary by CodeRabbit

  • New Features
    • Added a visual status chip in Trade Information, with localized labels and color-coded indicators.
  • Bug Fixes
    • Ensured the order status shown in chat reflects the current state consistently across views.
  • Style
    • Updated selected button color to a darker tone for improved contrast.
    • Disabled button animation to provide instant visual feedback.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Walkthrough

Extends Order.copyWith to include an optional Status. ChatRoomScreen now passes a copyWith(status: orderState.status) into TradeInformationTab. TradeInformationTab introduces a status chip via a new helper and localized labels. Info buttons adjust selected color and disable animation.

Changes

Cohort / File(s) Summary
Model: Order.copyWith
lib/data/models/order.dart
Added optional Status? status to copyWith; ensures buyerInvoice and status fall back to existing values when null.
Chat flow wiring
lib/features/chat/screens/chat_room_screen.dart
Passes order?.copyWith(status: orderState.status) to TradeInformationTab to reflect current status in UI.
Trade info status chip
lib/features/chat/widgets/trade_information_tab.dart
Introduces _buildStatusChip to render a localized status badge; updates layout to include a status chip alongside amount text.
Info buttons styling
lib/features/chat/widgets/info_buttons.dart
Changes selected foreground color to Color(0xFF1A1A1A) and sets animationDuration: Duration.zero to disable animations.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant ChatRoomScreen
    participant TradeInformationTab
    participant OrderState
    participant StatusChip as _buildStatusChip

    User->>ChatRoomScreen: Open chat room
    ChatRoomScreen->>OrderState: Read current status
    ChatRoomScreen->>TradeInformationTab: order.copyWith(status: OrderState.status)
    TradeInformationTab->>StatusChip: Build chip for provided Status
    StatusChip-->>TradeInformationTab: Chip widget (label + color)
    TradeInformationTab-->>User: Updated trade info with status badge
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Catrya
  • grunch

Poem

I hop through code with nimble feet,
A status chip—so small, so neat.
Copy, with care, the state we trust,
The trade now gleams with honest luster.
Buttons calm, no flashy show—
Just steady hops where data flow. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely summarizes the main changes—UI contrast improvements on the chat tab, correction of the shared key display, and fixing the status badge—without extraneous detail or vague language, giving reviewers immediate insight into the pull request’s scope.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/info-tabs-chat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@grunch grunch requested a review from Catrya October 1, 2025 13:58
Copy link
Member

@Catrya Catrya left a comment

Choose a reason for hiding this comment

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

en la descripcion del PR dice

Data Correction:
Fixed shared key display in User Information tab to show the correct private shared secret instead of derived public key
The shared key shown is now the actual NIP-44 computed shared secret used for message encryption/decryption

Pero no veo nada en los cambios de codigo que haga referencia a eso.

De todas formas ya la clave compartida que muetra es la privada, la que le pueden dar al admin para que lea lo que hablaron

@AndreaDiazCorreia
Copy link
Member Author

en la descripcion del PR dice

Data Correction:
Fixed shared key display in User Information tab to show the correct private shared secret instead of derived public key
The shared key shown is now the actual NIP-44 computed shared secret used for message encryption/decryption

Pero no veo nada en los cambios de codigo que haga referencia a eso.

De todas formas ya la clave compartida que muetra es la privada, la que le pueden dar al admin para que lea lo que hablaron

@Catrya se me olvido quitar esa parte, paso que haciendo el detalle de la disputa me daba un dato raro en los logs, pero revise si esa trade key estaba bien y por lo que vi si, asi que no lo toque

@Catrya
Copy link
Member

Catrya commented Oct 1, 2025

@AndreaDiazCorreia entonces para mí ya está bien, si puedes edita el mensaje del PR para que no quede esa parte que no está cambiada

@AndreaDiazCorreia
Copy link
Member Author

@Catrya listo

Copy link
Member

@Catrya Catrya left a comment

Choose a reason for hiding this comment

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

tACK

Copy link
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

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

bellorin

@grunch grunch merged commit af79d7e into main Oct 2, 2025
2 checks passed
@Catrya Catrya deleted the fix/info-tabs-chat branch October 22, 2025 15:15
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.

4 participants