there are PR comments to address on PR #85
- User
there are PR comments to address on PR #85
Assistant
Let me read the relevant files and the glyphs module to understand the current code.
Assistant
Let me check how
page_blockhandles titles.Assistant
Now I have full understanding of all 4 issues. Let me implement the fixes.
Assistant
Fix 1: Add
sector_selectedglyph field toGlyphSet.Assistant
Now update
sector_overview.rsto use the glyph system. First, add the import and get glyphs:Assistant
Now update the legend call to pass visual mode:
Assistant
Now update tests. Let me check the exact test lines after edits:
Assistant
Fix 4: Remove double padding from title in
sector_map.rs:Assistant
Fix 2: Gate hostile fleet count by fog visibility in
sector_overview.rs:Assistant
Fix 3: Gate hostile fleet count by fog in
sector_map.rs:Assistant
All tests pass. Now run clippy:
Assistant
All 4 PR comments addressed. Changes pushed to
copilot/farspace-tui-refresh-pass-2.Comment File Fix 1. Hard-coded ◆glyphglyphs.rs,sector_overview.rsAdded sector_selectedfield toGlyphSet(Ascii:@, Unicode:◆, NerdFont: Nerd icon). Routes throughglyphs_for_mode.2. Intel leak: hostile_fleets in sector overview sector_overview.rs:441Gated hostile_fleetscount onFogState::Visible— 0 otherwise.3. Intel leak: hostile_here in sector map sector_map.rs:605Gated hostile_herecount onFogState::Visible— 0 otherwise.4. Double-padded title sector_map.rs:102Removed extra spaces; page_blockadds its own{title}padding.Tests: 1129 passed. Clippy: clean.
- User
now lets do the same for PR 86
Assistant
Let me checkout the branch and read the relevant source files.
Assistant
Good, I understand all 5 issues. Let me implement fixes.
Comment 1 & 2 (ship_designer): Remove unreachable
attack <= 0/hp <= 0checks, replace with meaningful component-level checks. Fix test name.Comment 3 (ship_designer): Don't use
meter_linefor unbounded combat stats — show as plain numbers.Comment 4 (empire_overview): Use
quiet_panel_blockinstead ofpanel_block(title, true).Comment 5 (colony): Fix Food meter label to match bar ratio.
Assistant
Comment 1+2+3 (ship_designer.rs): Replace dead checks with component-level sums, remove meter bars for combat stats, fix test.
Assistant
Now fix Comment 3 — replace meter bars with plain numeric display for combat stats:
Assistant
Now remove the unused
clamp_to_100and clean upmeter_lineimport if unused:Assistant
Now fix Comment 2 — update test to assert the offense warning (now reachable):
Assistant
Comment 4: Change
panel_block(title, true)toquiet_panel_blockin empire_overview:Assistant
Comment 5: Fix Food meter to make label match bar ratio:
Assistant
Now let me run tests and clippy:
Assistant
All tests pass (425 TUI tests, 615 core, 105 save, 2 e2e). Now clippy:
Assistant
Fix unused import in
ship_designer.rs:Assistant
Fix manual checked division in
colony.rs:Assistant
All tests pass, clippy clean. Push:
Assistant
All 5 PR comments addressed. Changes pushed to
copilot/farspace-tui-refresh-pass-3.Comment File Fix 1. Unreachable attack/hp ≤ 0 checks ship_designer.rs:508-514Replaced with component-level attack_modifiersum — actually reachable for empty designs2. Test name vs body mismatch ship_designer.rs:708Added assert!(warnings...contains("offensive"))— now reachable due to comment 1 fix3. meter_lineon unbounded combat statsship_designer.rs:465-479Replaced meter bars with plain numeric spans for ATK/DEF/HP; removed clamp_to_1004. panel_blockalways focusedempire_overview.rs:665Changed to quiet_panel_block(no focus model on this screen)5. Food meter: bar vs label mismatch colony.rs:367-379Label now shows Food {production}/{consumption}matching the ratio the bar encodesTests: 1161 passed. Clippy: clean.
- User
CI fmt failures
Assistant
Done.
cargo fmtnow clean.