Skip to content

Fix - clipped cards, dev-mode exit, limpet default, carrier names - #106

Merged
demortes merged 1 commit into
mainfrom
claude/bugfix-four-bugs
Aug 10, 2026
Merged

demortes merged 1 commit into
mainfrom
claude/bugfix-four-bugs

Conversation

@demortes

Copy link
Copy Markdown
Contributor

What & why

Clears the four open bug reports against the dashboard. They are unrelated in cause but all small, so they ship together rather than as four one-line branches.

Closes #73, closes #74, closes #76, closes #90.

Changes

#73 — colonisation card is cut off. The cause is broader than the colonisation card: an Avalonia ItemsControl has no scroll viewer of its own, so the MaxHeight on each dashboard list clipped every row past it with no way to reach them. All eight capped lists are now wrapped in a ScrollViewer with the cap moved there — colonisation, materials, on-foot materials, on-foot mods, cargo, route, trade and market all had the identical defect.

Review this file with git diff -w. The substantive change is ~32 lines; the rest is re-indentation of the wrapped bodies.

#74 — exiting developer mode doesn't reset to live data. Turning dev mode off in Settings only updated the banner flag. The fabricated events had already gone through the real bus into the real CommanderState, so the cards kept showing invented systems and cargo — now with nothing on screen marking them as fake. The transition is routed through the existing ResetToLive path, which rebuilds the engine host and re-warms from the journal.

#76 — limpets default the trade finder. The card guessed the commodity by tonnage, and a full limpet rack outweighs the actual haul. Added CommodityName.IsLimpet in Core (covers drones, $drones_name;, and the localised "Limpet") and skips it when guessing. The field is left blank when limpets are all that's aboard, as the issue asked.

#90 — market card shows carrier callsign, not name. Docked/Location report a fleet carrier as its callsign; the name only ever arrives on CarrierStats. StateTracker now captures the carrier name and callsign from that event and records StationType, and a new StationDisplay helper resolves the two into a display name.

One judgment call worth a reviewer's attention: the issue notes that other commanders' carriers also report StationType: FleetCarrier. The name is substituted only when the docked callsign matches our own carrier's. Labelling a stranger's carrier with our carrier's name would be worse than the original bug, so a carrier that isn't ours keeps its callsign — and so does ours, until CarrierStats lands in the session. CommanderState.StationName still holds the raw journal value; StationDisplayName is the new commander-facing one. Market title reads Nomad's Reach (HIP 23759) with the callsign in a tooltip; the location card and CLI use the same resolution.

How it was verified

dotnet build EDNexus.slnx     # succeeded, 0 warnings, 0 errors (incl. Avalonia XAML compile)
dotnet test EDNexus.slnx      # 176 passed, 0 failed (162 before this branch)

14 new tests: six covering carrier naming (own carrier, another commander's carrier, docked before CarrierStats arrives, a normal station, and undocking) and four covering limpet recognition, plus theory cases.

Not verified, and worth a reviewer's pass:

  • No screenshot for [Bug] Colonisation card is cut off #73. The scroll fix was verified by XAML compile and reasoning about ItemsControl behaviour, not by running the app against a long shopping list. Worth eyeballing before merge.
  • [Bug] Exeiting developer mode doesn't reset to live data. #74 has no automated test. The test project references only EDNexus.Core; reaching MainWindowViewModel would mean pulling Avalonia and Bootstrap into it, which is a larger structural change than the one-line fix warrants. Manual check: enter dev mode → randomize all → exit dev mode → cards should return to live data.
  • No real-journal validation. The carrier tests use synthetic CarrierStats/Docked JSON built to the documented event shapes, not a captured journal from a live carrier.

Checklist

  • Builds clean (dotnet build EDNexus.slnx), no new warnings
  • Feature code reads CommanderState; only StateTracker mutates it
  • Platform-specific code sits behind an interface with a graceful fallback — n/a, none added
  • Validated against real journal data where relevant — synthetic events only, see above
  • No secrets, tokens, or personal journal files committed

🤖 Generated with Claude Code

…er names

Closes #73, #74, #76, #90.

**#73 — cards cut off.** An Avalonia ItemsControl has no scroll viewer of its
own, so the MaxHeight on each dashboard list silently clipped every row past
it with no way to reach them. Wrap all eight capped lists in a ScrollViewer
and move the cap there. The colonisation shopping list is the one in the
report, but materials, cargo, route, trade and market had the same defect.

**#74 — exiting developer mode kept the fabricated data.** Turning dev mode
off only updated the banner flag; the invented events had already gone
through the real bus into the real CommanderState, so the cards kept showing
them with nothing left to say they were fake. Route the transition through
the existing reset-to-live path, which rebuilds the engine and re-warms from
the journal.

**#76 — limpets defaulted the trade finder.** The card guessed the commodity
by tonnage, and a full limpet rack outweighs the actual haul. Skip them, and
leave the field blank when limpets are all that is aboard.

**#90 — market card showed a carrier callsign.** Docked/Location report a
fleet carrier as its callsign; the name only ever arrives on CarrierStats.
Capture the name and callsign there, record StationType, and resolve the two
into a display name — substituting the name only when the docked callsign is
our own carrier, since every other carrier reports a bare callsign too and
labelling one of those with our carrier name would be worse than the bug.
The market title becomes "Nomad's Reach (HIP 23759)" with the callsign in a
tooltip; the location card and CLI use the same resolution.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@demortes
demortes merged commit c2148f7 into main Aug 10, 2026
1 check passed
@demortes
demortes deleted the claude/bugfix-four-bugs branch August 10, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant