Phase 3: trade/end-game client, bot simulator, first balance pass
Built: - Client: trade screen, world/end-game screen (landing sites, shipping, node build, final ranking), report sharing + alliance reports tab, alert describers for all notification types, error-code strings (en+nb) for every server CODE. - tools/bot.js (+ tools/bot/): 50 headless bots against the real server in-process with a fake clock; resource/unit conservation ledger, exit 1 on broken invariants. docs/BALANCE.md has method and every run behind a number. - Balance changes (evidence in docs/BALANCE.md): secondQueueCoreLevel 10 -> 3, TRANSPORT.capacityPerLink 500 -> 1000 (end game was shipping-limited in bot runs). - Server fixes: POST /reports/:id/share 500 without a pending reportCleanup; bounced link shipments were silent about cargo overflow. Tested: npm test 207/207 (new: bot determinism + invariants, client alerts/world/i18n over CODES, two regression tests that failed before their fix); openapi check up to date. Real-browser scratch runs (not in repo): WebSocket push shows an incoming-attack banner ~214 ms after launch, polling fallback ~52 s, 15 scripted flows, 71 screenshots. NOT tested: Playwright suite (e2e/ still empty), real devices/Safari, nginx proxy websockets, throttled networks, HTTP-level bot load. NOT claimed: balance. Bots are not humans; open balance items (loot waste, escrow refund clipping, no garrisons at landing sites, end game not scaling with world speed) are listed in docs/BALANCE.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
parent
d84b0c9d12
commit
931f59e11e
49 changed files with 4750 additions and 59 deletions
|
|
@ -511,3 +511,95 @@ select { width: 100%; }
|
|||
.mil-train .cost { padding: 3px 8px; }
|
||||
.mil-train .cost svg.ic { width: 15px; height: 15px; }
|
||||
.mil-train .pill { max-width: none; }
|
||||
|
||||
/* ---------------------------------------------------------------- Internet exchange (trd-), end game (wld-), ended world */
|
||||
.trd-page, .wld-page { gap: 10px; }
|
||||
.trd-tabs .seg-btn { min-width: 0; padding: 0 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.trd-body { display: grid; gap: 12px; align-content: start; min-width: 0; }
|
||||
.trd-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
|
||||
.trd-filters .field:nth-child(3) { grid-column: 1 / -1; }
|
||||
.trd-reach { margin: 0 0 10px; }
|
||||
.trd-list { gap: 8px; }
|
||||
.trd-offer { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px 10px; align-items: start; }
|
||||
.trd-offer .row-main { gap: 6px; }
|
||||
.trd-offer .row-sub { white-space: normal; overflow-wrap: anywhere; }
|
||||
.trd-offer > .btn { grid-column: 1 / -1; min-height: 44px; }
|
||||
.trd-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
|
||||
.trd-term { display: grid; gap: 3px; min-width: 0; align-content: start; }
|
||||
.trd-lbl { font-size: 11px; color: var(--dimmer); text-transform: uppercase; letter-spacing: .08em; }
|
||||
.trd-terms .cost { width: max-content; max-width: 100%; }
|
||||
.trd-chips { margin-bottom: 2px; }
|
||||
.trd-need { display: grid; gap: 10px; }
|
||||
.trd-need .card-head { margin-bottom: 0; }
|
||||
.trd-pops { display: grid; gap: 8px; }
|
||||
.trd-pop { display: flex; align-items: flex-start; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 56px; }
|
||||
.trd-pop:has(input:checked) { border-color: var(--cyan); background: #0c1f33; }
|
||||
.trd-pop.off { opacity: .65; }
|
||||
.trd-pop input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--cyan); }
|
||||
.trd-form .field { margin-bottom: 8px; }
|
||||
.trd-form .sub { margin-top: 10px; }
|
||||
.trd-form .field-hint, .trd-form > .dimmer { display: block; margin-top: 2px; }
|
||||
.trd-page .card .detail-desc { margin-bottom: 8px; }
|
||||
.trd-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
|
||||
.trd-pair select, .trd-pair input.mil-num { min-height: 46px; }
|
||||
.trd-pair .btn.small { min-height: 46px; }
|
||||
.trd-msgs { display: grid; gap: 4px; margin-top: 8px; }
|
||||
.trd-msgs:empty { display: none; }
|
||||
.trd-note { display: grid; gap: 4px; margin-top: 4px; }
|
||||
.trd-links .mil-row { align-items: flex-start; }
|
||||
.trd-links .bar { margin-top: 6px; --c: var(--cyan); }
|
||||
.trd-empty { display: grid; gap: 8px; }
|
||||
|
||||
.wld-banner { display: flex; gap: 14px; align-items: center; border-color: var(--line2); }
|
||||
.wld-banner .row-main { gap: 6px; }
|
||||
.wld-banner h2 { font-size: 18px; line-height: 1.25; text-transform: none; letter-spacing: 0; color: var(--text); overflow-wrap: anywhere; }
|
||||
.wld-trophy { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 16px; background: var(--panel3); color: var(--cyan); }
|
||||
.wld-trophy svg.ic { width: 30px; height: 30px; }
|
||||
.wld-banner.open { border-color: color-mix(in srgb, var(--cyan) 55%, var(--line2)); }
|
||||
.wld-banner.won, .wld-banner.ended { border-color: #6b5a1f; background: rgba(43, 34, 8, .55); }
|
||||
.wld-banner.won .wld-trophy, .wld-banner.ended .wld-trophy { color: var(--amber); background: #3a2d08; }
|
||||
.wld-count { font-size: 26px; color: var(--cyan); line-height: 1.1; }
|
||||
.wld-cd { font-variant-numeric: tabular-nums; }
|
||||
.wld-bar { height: 8px; margin-top: 4px; --c: var(--dim); }
|
||||
.wld-bar.mine { --c: var(--cyan); } .wld-bar.rival { --c: var(--amber); } .wld-bar.incumbent { --c: var(--violet); } .wld-bar.build { --c: var(--amber); height: 6px; }
|
||||
.wld-sub { margin-top: 4px; }
|
||||
.wld-sites { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
|
||||
@media (min-width: 900px) { .wld-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wld-page { max-width: 980px; } }
|
||||
.wld-site { display: grid; gap: 8px; align-content: start; }
|
||||
.wld-site.mine { border-color: color-mix(in srgb, var(--cyan) 65%, var(--line)); background: rgba(10, 30, 50, .85); }
|
||||
.wld-site.rival { border-color: #6b5a1f; }
|
||||
.wld-site.flash { animation: wld-flash 1.6s ease-out 1; }
|
||||
@keyframes wld-flash { 0% { box-shadow: 0 0 0 3px var(--amber); } 100% { box-shadow: 0 0 0 0 transparent; } }
|
||||
.wld-site-head { display: flex; align-items: center; gap: 10px; }
|
||||
.wld-site-head .row-main { min-width: 0; }
|
||||
.wld-site .row-sub { white-space: normal; }
|
||||
.wld-holder { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.wld-level { display: grid; gap: 2px; }
|
||||
.wld-building { display: grid; gap: 2px; }
|
||||
.wld-acts { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.wld-how { padding-left: 20px; display: grid; gap: 6px; color: var(--dim); font-size: 14px; }
|
||||
.wld-sec { display: grid; gap: 8px; margin-top: 6px; }
|
||||
.wld-manage .costs { margin: 2px 0; }
|
||||
.wld-results { display: grid; gap: 8px; }
|
||||
.wld-results .card-head { margin-bottom: 0; }
|
||||
.wld-ranks { display: grid; gap: 6px; }
|
||||
.wld-rank { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-height: 52px; }
|
||||
.wld-rank .row-main { min-width: 0; }
|
||||
.wld-rank .row-sub { white-space: normal; overflow-wrap: anywhere; }
|
||||
.wld-rank.you { border-color: var(--cyan); background: #0c1f33; }
|
||||
.wld-rank.win { border-color: #6b5a1f; background: rgba(43, 34, 8, .55); }
|
||||
.wld-rank.win svg.ic { color: var(--amber); }
|
||||
.wld-ended-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-color: #6b5a1f; background: rgba(43, 34, 8, .6); }
|
||||
.wld-ended-card .row-main { flex: 1 1 200px; min-width: 0; }
|
||||
.wld-ended-card > .btn { flex: none; }
|
||||
.wld-ended-card .row-ic { color: var(--amber); }
|
||||
.lg.backbone { background: #2b2208; border: 2px solid #f5c542; transform: rotate(45deg) scale(.85); }
|
||||
|
||||
.ended-pill { margin-left: auto; background: #2b2208; color: var(--amber); border: 1px solid #6b5a1f; cursor: pointer; min-height: 30px; }
|
||||
html[data-ended] #app { box-shadow: inset 0 3px 0 #6b5a1f; }
|
||||
button[data-ended-lock] { cursor: not-allowed; }
|
||||
|
||||
.rep-tabs { margin-bottom: 0; }
|
||||
.rep-tabs .seg-btn { min-height: 42px; font-size: 14px; }
|
||||
.rep-verdict.neutral { background: var(--panel2); color: var(--dim); border: 1px solid var(--line2); }
|
||||
.rep-share { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue