Skip to content

feat(client): Phase 0 — data-layer prerequisites#20

Merged
Emperiusm merged 2 commits intomainfrom
copilot/add-phase-0-data-layer-prerequisites
Apr 3, 2026
Merged

feat(client): Phase 0 — data-layer prerequisites#20
Emperiusm merged 2 commits intomainfrom
copilot/add-phase-0-data-layer-prerequisites

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

Implements Phase 0 of the launcher UI polish plan: extends SavedServer with fields the redesign requires, adds a ServerStatus enum with heuristic derivation, and prepares TextRun/GlassQuad for non-breaking forward extensibility.

config/servers.rs

  • ServerStatus enum (Online, Sleeping, Unreachable) with serde derives
  • SavedServer::derived_status() — heuristic: None → Unreachable; age < 6h → Online; age < 7d → Sleeping; else Unreachable (temporary stand-in for runtime ping)
  • New schema fields — all #[serde(default)] for backwards-compatible deserialization of existing servers.json:
    • os_label: Option<String>, tags: Vec<String>, wol_supported: bool, last_latency_ms: Option<u32>

ui/launcher/server_card.rs

  • CardFilter::Tag(String) variant added; enum is now Clone-only (not Copy)
  • label() signature changed from fn label(self, total_cards: usize)fn label(&self) -> String
  • matches_filter() now takes &CardFilter and handles the Tag branch via self.tags.contains(tag)
  • ServerCard stores tags: Vec<String> populated from SavedServer

ui/widgets/mod.rs

  • Rect::ZERO constant added
  • TextRun gains bold: bool and icon: bool (both default false); manual Default impl sets font_size: 14.0 (not 0.0)
  • GlassQuad gets a Default impl using Rect::ZERO and zeroed floats
  • All TextRun { … } construction sites across the codebase migrated to ..Default::default() — ~50 call sites across overlays, launcher widgets, and card grid
// Before
ctx.push_text_run(TextRun {
    x: r.x + 18.0, y: r.y + 60.0,
    text: self.display_name.clone(),
    font_size: 16.0,
    color: theme::LT_TEXT_PRIMARY,
    monospace: false,
});

// After — forward-compatible with Phase 1 bold + Phase 5 icon fields
ctx.push_text_run(TextRun {
    x: r.x + 18.0, y: r.y + 60.0,
    text: self.display_name.clone(),
    font_size: 16.0,
    color: theme::LT_TEXT_PRIMARY,
    ..Default::default()
});

Plan progress tracker updated: Pass 0 and Phase 0 checked off.

Agent-Logs-Url: https://github.com/Emperiusm/PRISM/sessions/be721cd6-cc69-43dd-8fb5-da55e7485bfb

Co-authored-by: Emperiusm <3522086+Emperiusm@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement phase 0 data-layer prerequisites for launcher feat(client): Phase 0 — data-layer prerequisites Apr 3, 2026
Copilot AI requested a review from Emperiusm April 3, 2026 07:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

Thank you for your contribution! Before we can merge this PR, you need to sign the Contributor License Agreement.

PRISM is dual-licensed (AGPL-3.0 + Commercial), so we need all contributors to sign the CLA to maintain the ability to offer commercial licenses.

To sign, please comment below with the exact phrase:

I have read the CLA Document and I hereby sign the CLA

You only need to do this once — future PRs will be automatically approved.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@Emperiusm
Copy link
Copy Markdown
Owner

I have read the CLA Document and I hereby sign the CLA

@Emperiusm Emperiusm marked this pull request as ready for review April 3, 2026 07:15
@Emperiusm Emperiusm merged commit 841a54d into main Apr 3, 2026
0 of 3 checks passed
@Emperiusm Emperiusm deleted the copilot/add-phase-0-data-layer-prerequisites branch April 3, 2026 07:18
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.

Launcher Polish — Phase 0: Data-Layer Prerequisites

2 participants