Skip to content

fix(orders): prevent UUID truncation in listorders table#159

Open
codaMW wants to merge 1 commit intoMostroP2P:mainfrom
codaMW:fix/listorders-uuid-truncation
Open

fix(orders): prevent UUID truncation in listorders table#159
codaMW wants to merge 1 commit intoMostroP2P:mainfrom
codaMW:fix/listorders-uuid-truncation

Conversation

@codaMW
Copy link
Contributor

@codaMW codaMW commented Mar 6, 2026

Problem

Order IDs in the listorders table were being truncated and wrapped
across multiple lines, making it impossible to copy and use them in
other commands like takebuy, takesell, cancel, etc.

Example of broken output:

│ ba8b23c0-fbce-4e76-9bf8-37feec1 │
│ 54fa1 │

This caused commands to fail with "invalid group length" errors when
users copied the truncated UUID.

Fix

Added an Absolute column constraint (Width::Fixed(38)) on the
Order ID column to ensure full UUIDs always display on a single line
regardless of terminal width or payment method column content.

Testing

Tested with listorders (full list) and filtered views:

  • mostro-cli listorders : all UUIDs on single line ✅
  • mostro-cli listorders -k buy -c usd: all UUIDs on single line ✅
  • Copied UUID directly into takebuy command: no more truncation errors ✅

Summary by CodeRabbit

  • Style
    • Improved Order Id column width in order tables for enhanced readability.

Order IDs were being truncated and wrapped across multiple lines
making them impossible to copy and use in other commands like
takebuy, takesell, cancel etc.

Added Absolute column constraint (Width::Fixed(38)) on the Order ID
column (index 1) to ensure full UUIDs always display on a single line
regardless of terminal width or other column content.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5a6c0ce-6d57-4fb5-9fe5-833fb8b44140

📥 Commits

Reviewing files that changed from the base of the PR and between 9b0ecb2 and 90faf64.

📒 Files selected for processing (1)
  • src/parser/orders.rs

Walkthrough

A formatting constraint is added to the Order Id column in the print_orders_table function to enforce a fixed width of 38 via ColumnConstraint, without modifying data processing logic.

Changes

Cohort / File(s) Summary
Table Formatting Enhancement
src/parser/orders.rs
Added ColumnConstraint to enforce a minimum width of 38 on the Order Id column (index 1) in the print_orders_table function.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A column grows wide, oh what a delight,
With constraints in place, the table looks right,
Thirty-eight pixels of order-filled grace,
No logic was harmed—just formatting's embrace! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: preventing UUID truncation in the listorders table by fixing a formatting constraint issue.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

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