Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/SdazaP/ruTournament/llms.txt

Use this file to discover all available pages before exploring further.

The Results page (/dashboard/tournament/:id/results) is where competition data is recorded during or after the competition. It is split into two tabs — WCA Format for standard average-based categories and Red Bull for head-to-head elimination brackets. Both tabs share the same edit-mode workflow: activate editing, enter times, save, and the data is immediately persisted to IndexedDB.

Selecting a category and round

Use the Categoría and Ronda dropdowns at the top of the page to navigate between events. Only WCA-format categories (those without format: 'redbull') appear in this tab. Switching categories resets the selected round to round 1 and closes any open inline editor.

The results table

The results table lists every competitor registered for the selected round. Columns are:
ColumnDescription
CompetitorName, left-aligned
T1 – T3 or T1 – T5Individual solve times (3 for ao3, 5 for ao5)
BestFastest valid solve, highlighted in blue
AvgCalculated average, highlighted in green
On screens narrower than 768 px the table switches to a card layout — one card per competitor, with a compact 3- or 5-column grid for the individual times.

Entering times

1

Activate Edit Mode

Click Activar Edición. A yellow floating badge confirms the mode is active. The button is disabled (with a lock icon) when the tournament status is not activo.
2

Click a time cell

Click any time cell for the competitor you want to edit. All five (or three) cells for that competitor become editable simultaneously.
3

Type the time

Times can be entered in several formats. The app auto-formats on blur:
  • Short integers — typing 974 is formatted to 9.74.
  • 5+ digits — typing 10678 is formatted to 1:06.78.
  • Explicit decimal — typing 9.74 or 1:06.78 is accepted as-is.
This behaviour mirrors the WCA Smart Input standard used by official competition software.
4

Apply penalties (optional)

Each time cell has +2 and DNF toggle buttons. Clicking an already-active penalty clears it (toggling back to clean '').
5

Save

Click Guardar in the editing toolbar, or click a different competitor’s row to auto-save before switching. Click Cancelar to discard changes for the current competitor.

TimeRecord structure

Every solve is stored as a TimeRecord:
interface TimeRecord {
  base: number;      // raw time in seconds, e.g. 9.74
  penalty: '' | '+2' | 'DNF';
}
The effective time used for ranking is base + (penalty === '+2' ? 2 : 0). A penalty of 'DNF' means the solve does not count as a valid finish.

Average calculation

Averages are computed by calculateRulesStats(times, format) from ResultsWCA.tsx:
export const calculateRulesStats = (
  times: TimeRecord[],
  format: 'ao3' | 'ao5'
) => { ... };
  • ao5 — drop the single best and single worst valid time, average the remaining 3. If two or more solves are DNF, the average is DNF (-1).
  • ao3 — average all three solves. Any single DNF makes the average DNF.
Results are only computed once all solve slots have a value (base > 0 or penalty === 'DNF'); partial rows display for best and average until complete.

Ranking rules

The sortWCA function ranks competitors in this priority order:
  1. Valid averages (ascending).
  2. DNF averages (after all valid averages).
  3. Incomplete results (no average yet).
Within a tie on average, competitors are ranked by best single (ascending). A second tie falls back to alphabetical name order.
Competitors are ranked by average first, then by best single. DNF averages rank after all valid averages but before incomplete rows.

Round advancement

Each round stores a competitorsToAdvance value (a number or 'all'). The results page reads the previous round’s sorted results and filters the current round’s participant list to only include those who advanced. You do not need to manually promote competitors — switching to a later round automatically shows only the qualifying subset.

Build docs developers (and LLMs) love