Files
amethyst/desktopApp
Claude 8187028c35 fix: audit findings in the code moved to commons
Pre-existing bugs found while auditing the moved files, none introduced
by the move:

- showAmount/showAmountInteger rounded half-even (Kotlin's BigDecimal
  div) so 12,500 read "12k", and picked the unit before rounding so
  999,500 read "1000k".
- AgentWorkBoard.merge ordered every band by upvotes, not just the queue.
- SuspendableConfirmation could resume twice (tap + dismiss) and left a
  dead dialog when the upload was cancelled.
- TorDialogViewModel.save rejected Internal/Off over a hidden, invalid
  port, and accepted out-of-range ports for External.
- ExpandingCirclesAnimation ran an infinite transition whenever the
  composer was open; the circles now exist only while recording and
  animate in the draw phase.
- DebouncedPublisher.flush cancelled and restarted a publish already in
  flight (a second signer request).
- RelayFeedViewModel read the wrong note for the DM list's first
  emission, and compared the flow instead of its value.
- ScheduledFlag built a DateFormat per composition; Cashu discovery
  progress could step backwards; Desktop's chess view model kept
  polling after an account switch replaced it.

New tests: ZapFormatterTest, SuspendableConfirmationTest,
TorDialogViewModelTest, and a DebouncedPublisher case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkG4KTqmnprUK9BAcwAyc8
2026-09-27 14:18:07 +00:00
..