summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/GUI-PLAN.md71
-rw-r--r--docs/TESTING.md60
-rw-r--r--docs/screenshots/gui-blackjack-1080p.pngbin0 -> 60075 bytes
-rw-r--r--docs/screenshots/gui-crash-1080p.pngbin0 -> 64377 bytes
-rw-r--r--docs/screenshots/gui-history-1080p.pngbin0 -> 166509 bytes
-rw-r--r--docs/screenshots/gui-lobby-1080p.pngbin0 -> 64944 bytes
-rw-r--r--docs/screenshots/gui-roulette-1080p.pngbin128158 -> 118143 bytes
-rw-r--r--docs/screenshots/gui-roulette-result-1080p.pngbin127283 -> 113253 bytes
-rw-r--r--docs/screenshots/gui-slots-1080p.pngbin0 -> 78173 bytes
9 files changed, 86 insertions, 45 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
107The approved reference lives at `docs/screenshots/gui-roulette-1080p.png`, with 105The Phase 4 screenshots in `docs/screenshots/` supersede the spike captures;
108the result state at `docs/screenshots/gui-roulette-result-1080p.png`. 106they 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.
111still 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
141Verified live against a v4.2.0 server: register, login, auto-login, trust,
142all four games settling, history, logout, disconnect, the leave-forfeit
143confirmation, and the version-mismatch screen (new client against a 4.1.1
144server).
145
146Screenshots: `docs/screenshots/gui-{lobby,slots,roulette,blackjack,crash,
147history}-1080p.png`, plus the roulette result state.
112 148
113## Phase 4 — GUI wiring 149Measured 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:
122modem-throttled run. 160frame 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
diff --git a/docs/TESTING.md b/docs/TESTING.md
index 32fc628..817cb3d 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -46,7 +46,7 @@ or a vendored OpenSSL.
46| `tests/slots.rs` | Server slots payout rules and overflow handling. | 46| `tests/slots.rs` | Server slots payout rules and overflow handling. |
47| `tests/storage.rs` | Client/server SQLite storage helpers. | 47| `tests/storage.rs` | Client/server SQLite storage helpers. |
48| `tests/tofu.rs` | SPKI fingerprint and TOFU decisions. | 48| `tests/tofu.rs` | SPKI fingerprint and TOFU decisions. |
49| `gui/tests/layout.rs` | GUI presentation maths: money grouping, wheel angle, table aspect, bet names. | 49| `gui/tests/layout.rs` | GUI presentation maths: money grouping, wheel angle, table aspect, lattice snapping (straight/split/corner/outside), bet names. |
50 50
51`tests/tofu.rs` and `tests/server_setup.rs` shell out to `openssl`, so run them 51`tests/tofu.rs` and `tests/server_setup.rs` shell out to `openssl`, so run them
52on a machine where the `openssl` CLI is available. 52on a machine where the `openssl` CLI is available.
@@ -118,34 +118,36 @@ Use an 80-column terminal because several output lines are width-sensitive.
118 118
119## Manual GUI checklist 119## Manual GUI checklist
120 120
121The GUI is a style spike until Phase 4: the table and wheel are painted from a 121The desktop frontend shares `ClientCore` and the data directory with the
122demo `RouletteView`, and no network connection is made. Run it on Linux and on 122terminal client; a saved login from one signs in the other.
123Windows 10 before approving the look. 123
124 1241. `cargo run -p zagan-bet-gui` (or `-d <dir>` / `--unsafe`). The connect
1251. `cargo run -p zagan-bet-gui` at 1440x900, then at 1920x1080. The header 125 screen lists remembered hosts with short fingerprints.
126 keeps its right margin at both sizes and shows ONLINE, host, ping, account 1262. First contact: the fingerprint modal appears before any credentials. Cancel
127 and balance; the table is centred and the sidebar is full height. 127 leaves the connect screen; Trust continues to the login screen.
1282. The felt shows 0, the 3x12 numbers, dozens, columns (each a quarter of the 1283. Register, then log in with "Remember this login". The lobby shows the host,
129 row) and the six outside cells. Chips sit on their targets: a straight in 129 ping, account, balance and the four games; quit and reconnect: the stored
130 the cell, a corner on the lattice crossing, an outside bet in its box. 130 login signs in without asking.
1313. Hover a number: a translucent chip of the selected denomination appears. 1314. Each game: place a bet or deal, play a round, and confirm the balance and the
132 In the inner half of a cell it is a straight (one cell tints); near an edge 132 header update. Slots shows reels and win lines; roulette spins the wheel and
133 it snaps to a split (two cells tint) and near a corner to a corner (four 133 reports the payout; blackjack draws suits and settles; crash draws a smooth
134 cells tint). Hovering the dozens, columns and outside boxes moves the 134 curve and cashes out. While the reels or wheel turn, the balance shows the
135 preview there. 135 stake already deducted; the payout appears only when they stop. A spin or
1364. Left click adds the chip where the preview is; right or middle click takes 136 deal the server refuses (for example an insufficient balance) shows the
137 one chip of that value back, dropping the row when it reaches zero. The 137 error and must not animate the reels, the wheel or the curve.
138 slip and total follow every change. C or CLEAR empties the slip. 1385. Sidebar actions never move while the slip grows. CLEAR empties the slip;
1395. Space or SPIN animates the wheel for about 2.4 s and stops with the winning 139 right or middle click on the felt takes one chip back; C clears and space
140 pocket under the pointer. The winning cell gets a gold outline and LAST 140 spins in roulette.
141 gains a dot. RESULT names the number and colour, WON shows the amount paid 1416. Leaving a live blackjack hand or crash round asks for confirmation, then
142 and the net for the round, and a losing spin says NO WIN. SPIN, CLEAR and 142 forfeits. Leaving an idle table returns to the lobby.
143 the chips are disabled during the spin. 1437. HISTORY shows the last plays; SHOW changes the limit. LOG OUT returns to
1446. Placing a chip after a result starts the next round: the payout row goes 144 the login screen but stays connected; Disconnect drops the session (the
145 back to PLACE YOUR BETS while the wheel stays where it stopped. Resize to 145 saved login survives).
146 1100x720: the sidebar scrolls, nothing overlaps the header, and the table 1468. Run the client against a server of another MAJOR.MINOR version: the
147 keeps its aspect ratio. 147 mismatch screen names both versions and the download page. A changed host
1487. Compare the 1080p window against the approved reference screenshots. 148 key stops the connection and offers forget-and-reconnect.
1499. Resize to 1100x720: the sidebar scrolls, the actions stay reachable, and
150 the board keeps its aspect ratio.
149 151
150## Manual roulette checklist 152## Manual roulette checklist
151 153
diff --git a/docs/screenshots/gui-blackjack-1080p.png b/docs/screenshots/gui-blackjack-1080p.png
new file mode 100644
index 0000000..b0fcc19
--- /dev/null
+++ b/docs/screenshots/gui-blackjack-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-crash-1080p.png b/docs/screenshots/gui-crash-1080p.png
new file mode 100644
index 0000000..245a3a1
--- /dev/null
+++ b/docs/screenshots/gui-crash-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-history-1080p.png b/docs/screenshots/gui-history-1080p.png
new file mode 100644
index 0000000..a979dcd
--- /dev/null
+++ b/docs/screenshots/gui-history-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-lobby-1080p.png b/docs/screenshots/gui-lobby-1080p.png
new file mode 100644
index 0000000..a258967
--- /dev/null
+++ b/docs/screenshots/gui-lobby-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-roulette-1080p.png b/docs/screenshots/gui-roulette-1080p.png
index 2f30aa7..1d7af3d 100644
--- a/docs/screenshots/gui-roulette-1080p.png
+++ b/docs/screenshots/gui-roulette-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-roulette-result-1080p.png b/docs/screenshots/gui-roulette-result-1080p.png
index a7d425c..fe4c9cd 100644
--- a/docs/screenshots/gui-roulette-result-1080p.png
+++ b/docs/screenshots/gui-roulette-result-1080p.png
Binary files differ
diff --git a/docs/screenshots/gui-slots-1080p.png b/docs/screenshots/gui-slots-1080p.png
new file mode 100644
index 0000000..9d79321
--- /dev/null
+++ b/docs/screenshots/gui-slots-1080p.png
Binary files differ