Skip to content

gardening: [manual-layout] replace Printf.sprintf %-*s alignment in wallets_page list panel with Grid_layout #804

@mathiasbourgoin

Description

@mathiasbourgoin

Summary

wallets_page.ml (and the original keys_page.ml) uses Printf.sprintf "%-*s" for manual string alignment in the list panel row renderer and in address_entry_to_string for modal pickers.

This violates the HARD RULE: all TUI layouts must use Flex_layout/Grid_layout.

Files

  • src/ui/pages/wallets_page.ml:481Printf.sprintf "%-*s" alias_width raw_alias in list panel row
  • src/ui/pages/wallets_page.ml:1269-1270Printf.sprintf "%-14s" in modal picker address_entry_to_string

Suggested Fix

Use Grid_layout tracks with Px 20 and Fill columns for the list row rendering. The modal picker can use a fixed-width Box_widget or Flex.Px 14 column.

Pre-existing Debt

This code came from keys_page.ml which had the same issue. Not introduced by PR #784 but surfaced during review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gardeningOngoing maintenance, refactoring, and code health tasks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions