feat: ranked queue Elo-bracket matchmaking and harder prompts
Elo-bracket matchmaking: prefer ±200, widen by 100 every 15s of waiting. Add pickRankedChallenge() that filters to creative/open-ended only, never multiple choice. Show ranked queue status, wait estimate, and "HARDER PROMPTS" notice on JoinBoutPage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e229bfb8fc
commit
156c727f82
@@ -25,6 +25,8 @@ const isJoining = ref(false)
|
||||
const isJoiningRanked = ref(false)
|
||||
const isJoiningPractice = ref(false)
|
||||
const queueCount = ref(0)
|
||||
const rankedQueueCount = ref(0)
|
||||
const rankedEstWait = ref(15)
|
||||
let pollHandle: ReturnType<typeof setInterval> | null = null
|
||||
|
||||
// Registration form
|
||||
@@ -112,11 +114,19 @@ onUnmounted(() => {
|
||||
|
||||
async function pollQueue() {
|
||||
try {
|
||||
const res = await fetch('/api/queue/status')
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
const [freeRes, rankedRes] = await Promise.all([
|
||||
fetch('/api/queue/status'),
|
||||
fetch('/api/queue/ranked-status'),
|
||||
])
|
||||
if (freeRes.ok) {
|
||||
const data = await freeRes.json()
|
||||
queueCount.value = data.waiting
|
||||
}
|
||||
if (rankedRes.ok) {
|
||||
const data = await rankedRes.json()
|
||||
rankedQueueCount.value = data.waiting
|
||||
rankedEstWait.value = data.estimatedWaitSec ?? 15
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('[JoinBout] queue poll failed:', err)
|
||||
}
|
||||
@@ -1039,6 +1049,15 @@ function handleSignOut() {
|
||||
<span class="text-[9px] font-mono tracking-normal font-normal text-neon-cyan/70">21 SATS — WINNER TAKES ALL</span>
|
||||
</button>
|
||||
|
||||
<!-- Ranked queue info -->
|
||||
<div v-if="!isHumanMode && !bot?.isHuman" class="flex items-center justify-between px-1">
|
||||
<span class="font-mono text-[9px] text-text-muted">
|
||||
{{ rankedQueueCount > 0 ? `${rankedQueueCount} waiting` : 'No queue' }}
|
||||
— ~{{ rankedEstWait }}s wait
|
||||
</span>
|
||||
<span class="font-pixel text-[8px] text-neon-purple tracking-wider">HARDER PROMPTS</span>
|
||||
</div>
|
||||
|
||||
<!-- Wallet connect (shown if no wallet) -->
|
||||
<WalletConnect v-if="!isHumanMode && !bot.isHuman" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user