diff options
Diffstat (limited to '')
| -rw-r--r-- | docs/GUI-PLAN.md | 71 |
1 files changed, 55 insertions, 16 deletions
diff --git a/docs/GUI-PLAN.md b/docs/GUI-PLAN.md index bb63530..4279626 100644 --- a/docs/GUI-PLAN.md +++ b/docs/GUI-PLAN.md | |||
| @@ -67,9 +67,7 @@ crash board from its local clock. | |||
| 67 | 67 | ||
| 68 | **Gate:** all four games playable in the TUI through `Command`/`View`. | 68 | **Gate:** all four games playable in the TUI through `Command`/`View`. |
| 69 | 69 | ||
| 70 | ## Phase 3 — `gui/` skeleton and the style spike | 70 | ## Phase 3 — `gui/` skeleton and the style spike (done) |
| 71 | |||
| 72 | **Code complete in v4.1.0; awaiting the screenshot sign-off.** | ||
| 73 | 71 | ||
| 74 | - `gui/` is a workspace member (`zagan-bet-gui`). It depends on the core with | 72 | - `gui/` is a workspace member (`zagan-bet-gui`). It depends on the core with |
| 75 | `default-features = false`, so neither egui nor native-tls enters the TUI or | 73 | `default-features = false`, so neither egui nor native-tls enters the TUI or |
| @@ -104,24 +102,65 @@ Measured on Linux at 1080p with llvmpipe software GL: | |||
| 104 | | Idle RSS | 137 MB | | 102 | | Idle RSS | 137 MB | |
| 105 | | Idle CPU | 0% | | 103 | | Idle CPU | 0% | |
| 106 | 104 | ||
| 107 | The approved reference lives at `docs/screenshots/gui-roulette-1080p.png`, with | 105 | The Phase 4 screenshots in `docs/screenshots/` supersede the spike captures; |
| 108 | the result state at `docs/screenshots/gui-roulette-result-1080p.png`. | 106 | they show the same layout with the real session and the pinned action bars. |
| 109 | 107 | ||
| 110 | **Gate:** the screenshot needs your approval. Frame rate on integrated graphics | 108 | **Gate:** met. The style was approved and the spike grew into Phase 4. |
| 111 | still needs a run on real hardware. | 109 | |
| 110 | ## Phase 4 — GUI wiring (code complete, v4.2.0) | ||
| 111 | |||
| 112 | - `gui/src/net.rs` is the adapter's network worker. One blocking thread owns the | ||
| 113 | TLS stream; `Command` goes in, `Event` comes out (connected, failed, trust, | ||
| 114 | line, closed), and every event calls `Context::request_repaint`. There is no | ||
| 115 | async runtime. | ||
| 116 | - First contact is a modal that answers the transport's trust callback through | ||
| 117 | a channel. A changed key is a hard stop with an explicit forget-and-retry; | ||
| 118 | a version mismatch links to the download page; a saved credential auto-logs | ||
| 119 | in before the login screen is ever shown. | ||
| 120 | - Screens: connect (remembered hosts, forget trust), login/register with a | ||
| 121 | "remember this login" choice, lobby with the update notice, history table, | ||
| 122 | and the four games. "Log out" and "forget saved login" are separate. Leaving | ||
| 123 | a live hand or round asks first and forfeits the reservation. | ||
| 124 | - Games are painted from `View`: slots with a 0.9 s reel animation and payline | ||
| 125 | highlights, roulette with the wheel spin, the hover lattice, chip placement | ||
| 126 | and payouts, blackjack with vector-drawn suits and legal actions, crash with | ||
| 127 | a sampled curve, cashout and a server-drawn crash point. A refused spin shows | ||
| 128 | the error and never runs the animation: the reels and the wheel wait for the | ||
| 129 | server's answer, not for the click. | ||
| 130 | - Sidebars pin their action block below the content, so SPIN, CLEAR, DEAL and | ||
| 131 | START never move as the bet slip or a hand grows. The embedded fonts have no | ||
| 132 | suit or arrow glyphs, so suits are shapes and navigation uses plain words. | ||
| 133 | - The header balance is held at the staked amount while the reels or wheel | ||
| 134 | turn, then jumps to the settled value: the GUI never reveals a payout before | ||
| 135 | the animation does. Refused spins cancel the animation and show the error. | ||
| 136 | The crash multiplier keeps full precision in the game state so the chart is | ||
| 137 | a smooth line; the terminal still formats it to two decimals. | ||
| 138 | - `gui/tests/layout.rs` covers money, wheel angles, lattice snapping, table | ||
| 139 | aspect and bet names. | ||
| 140 | |||
| 141 | Verified live against a v4.2.0 server: register, login, auto-login, trust, | ||
| 142 | all four games settling, history, logout, disconnect, the leave-forfeit | ||
| 143 | confirmation, and the version-mismatch screen (new client against a 4.1.1 | ||
| 144 | server). | ||
| 145 | |||
| 146 | Screenshots: `docs/screenshots/gui-{lobby,slots,roulette,blackjack,crash, | ||
| 147 | history}-1080p.png`, plus the roulette result state. | ||
| 112 | 148 | ||
| 113 | ## Phase 4 — GUI wiring | 149 | Measured on Linux at 1080p with llvmpipe software GL: |
| 114 | ## Phase 4 — GUI wiring | ||
| 115 | 150 | ||
| 116 | - Network thread with channels, request deadlines in the shared adapter. | 151 | | Check | Result | |
| 117 | - Trust modal, version-mismatch screen, login/register, lobby, history panel. | 152 | | --- | --- | |
| 118 | - All four games, per-frame painting and tier 1–2 effects. | 153 | | Linux binary | 8.3 MB | |
| 119 | - Update notice from the handshake in the lobby. | 154 | | Windows x86_64 binary | 6.8 MB | |
| 155 | | Cold start to window | 61 ms | | ||
| 156 | | Idle RSS | 131 MB | | ||
| 157 | | Idle CPU | 0% | | ||
| 120 | 158 | ||
| 121 | **Gate:** manual checklist per game at 60 fps, `egui_kittest` wiring tests, | 159 | **Gate:** the screenshot set is ready for review. Remaining for the gate: |
| 122 | modem-throttled run. | 160 | frame rate on integrated graphics and the Windows interactive pass. |
| 123 | 161 | ||
| 124 | ## Phase 5 — packaging | 162 | ## Phase 5 — packaging |
| 163 | ## Phase 5 — packaging | ||
| 125 | 164 | ||
| 126 | - `publish.sh` emits `zagan-bet-gui-<version>-<platform>-<arch>[.exe]`. | 165 | - `publish.sh` emits `zagan-bet-gui-<version>-<platform>-<arch>[.exe]`. |
| 127 | - Bash and PowerShell installers that verify the SHA-256, install to the user | 166 | - Bash and PowerShell installers that verify the SHA-256, install to the user |
