| Age | Commit message (Collapse) | Author |
|
Submission history is now shown inline on the play screen,
making the dedicated /golf/:gameId/submissions page redundant.
|
|
|
|
Replace the placeholder submission status section with a full submission
history table using the existing getGamePlaySubmissions API. Extract
shared DataTable, DataTableCell, and formatUnixTimestamp from
RankingTable into a reusable Gaming/DataTable component.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
layout shift
Show plaintext with Shiki-compatible line structure (.shiki > code > .line)
from the start, so CSS line-number counters apply immediately. This prevents
the popover from jittering when Shiki replaces the content. If Shiki fails,
the plaintext with line numbers remains as a natural fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
DB stores stdin/code with CRLF intact, but workers expect LF. Add
normalizeCRLF helper and apply it to code and stdin in EnqueueTestTasks.
Refactor normalizeTestcaseResultOutput to reuse the same helper.
|
|
Admin games list page already shows all games including non-public
ones, but play/watch links were hidden behind an IsPublic check.
Since this is an admin-only page, always show the links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Admin users can now access the gaming UI (problem description, code
editor, submit button) even when a game has not started yet. Regular
users still see the waiting screen as before.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add watch page link to golf problem preview
|
|
started_at の条件分岐を削除し、対戦・観戦ページへのリンクを
常に表示するようにした。
https://claude.ai/code/session_019qZoTGJ1R2vnAzxZLiSEhx
|
|
対戦ページへのリンクと並べて観戦ページへのリンクを表示するようにした。
ゲーム開始後に両方のリンクが横並びで表示される。
https://claude.ai/code/session_019qZoTGJ1R2vnAzxZLiSEhx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Display usernames in submission lists and details
|
|
Expand developer guide with comprehensive setup and architecture docs
|
|
Submissions list and detail pages now display the username alongside the
user ID instead of showing only a numeric ID. The problems list page now
includes a direct link to each problem's testcases for easier navigation.
https://claude.ai/code/session_01JF5ZmGAQ4zNbhV5DM729Fw
|
|
The existing DEV.md was minimal, covering only a brief architecture
list, dependencies, and basic setup steps. Rewrite it as a full
developer guide covering architecture details, project structure,
all just commands, code generation workflow, testing/linting,
database management, CI pipeline, and environment variables.
https://claude.ai/code/session_01UVdjU4rCYUnZNt6fFECwAe
|
|
Fix golangci-lint revive warnings by removing package name prefixes:
- game.GameHubInterface → game.HubInterface
- game.GameDetail → game.Detail
- tournament.TournamentEntry → tournament.Entry
- tournament.TournamentMatch → tournament.Match
- tournament.TournamentBracket → tournament.Bracket
- tournament.TournamentEditData → tournament.EditData
Also fix gofmt alignment in api/convert.go and gosimple S1016 in
game/service.go.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Move transaction handling, rejudge workflow, tournament bracket creation,
and data repair logic from admin handler into game.Service and
tournament.Service, mirroring the earlier api package separation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Extract business logic from api/handler.go into dedicated service packages:
- session: context helpers (resolves admin → api import dependency)
- game: game state, code submission, ranking, watch logic
- tournament: bracket construction and seed ordering
- api/convert.go: domain → API type conversion functions
api/handler.go is now a thin adapter that delegates to services and
maps domain errors to HTTP status codes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Move regexp.MustCompile out of CalcCodeSize to avoid recompiling
on every call.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Allow unauthenticated users to view games and watch matches
|
|
https://claude.ai/code/session_019j9tNcnLsLz15e1qtbmeqe
|
|
https://claude.ai/code/session_019j9tNcnLsLz15e1qtbmeqe
|
|
Make watch, ranking, game list, and tournament endpoints accessible
without authentication. Unauthenticated users can browse games and
spectate from the index page, while play/submit/preview still require
login.
https://claude.ai/code/session_019j9tNcnLsLz15e1qtbmeqe
|
|
Allow participants to view problem descriptions and sample code
before a game starts. Dashboard shows a preview link only for
games that haven't started yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Allow users to view their own past submissions (code, size, status,
timestamp) for each game. Adds API endpoint, backend handler, SQL query,
and frontend page with expandable code display.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Use Go 1.22+ range-over-integer syntax, replace interface{} with any,
and remove redundant type parameters.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Mount asynqmon HTTP handler under admin/queue with existing session
cookie and admin middleware authentication.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add ClientIPMiddleware to extract client IP into context.Context,
enabling structured log output with username, IP, and failure reason
for login attempts. Change failed login log level from Error to Warn
as authentication failures are expected events.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Extract common rejudge logic into a helper method and add two new
endpoints: rejudge-latest (per-user latest only) and rejudge-all.
This allows re-running submissions in bulk after testcase changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Allow administrators to re-execute test cases for a specific submission
from the submission detail page. This is useful after testcase fixes or
worker issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Replace hardcoded 6-person tournament with a generic single-elimination
bracket system backed by new DB tables (tournaments, tournament_entries,
tournament_matches). Includes admin CRUD, standard seeding algorithm,
bye handling, and a CSS Grid bracket renderer on the frontend.
Add comprehensive tests for backend API/admin handlers, seeding logic,
and frontend bracket component.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Replace all remaining references to the forked event name:
- Base path: /iosdc-japan/2025/code-battle/ → /phperkaigi/2026/code-battle/
- Display text and HTML titles
- CSS utility class: bg-iosdc-japan → bg-phperkaigi
- GitHub Actions submodule path: albatross-swift-2025 → albatross-php-2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add 84 new tests covering Jotai atoms (play/watch state transitions,
game timing, score management), utility functions (calcCodeSize,
checkGameResultKind), UI components (SubmitStatusLabel, LeftTime,
SubmitButton, InputText, BorderedContainerWithCaption,
FoldableBorderedContainerWithCaption, UserIcon, PlayerNameAndIcon),
and the usePageTitle hook.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
Set up Vitest with @testing-library/react and jsdom for frontend
unit testing. Add sample tests for config.ts and BorderedContainer.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Extract testable logic from exec.mjs into lib.mjs (preprocessCode,
createIOCallbacks, buildResult) and add vitest tests. Add Go tests
for models, exec helpers, and handlers in worker/swift. Update
justfiles to include test tasks for local dev and CI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
account, and more handlers
Cover previously untested code: SessionCookieMiddleware, context helpers,
downloadFile, addAcceptHeader, doProcessTaskRunTestcase, updateSubmissionAndGameState,
PostLogout, GetGames, PostGamePlayCode, GetGameWatchRanking, GetGameWatchLatestStates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Add comprehensive tests for previously untested packages:
- admin: middleware auth checks, CRUD handlers for users/games/problems/testcases
- taskqueue: task creation, payload serialization, code hash calculation
- api: expose SetUserInContext helper for cross-package test support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Cover previously untested logic: session ID generation/hashing,
password authentication, IP rate limiting, game state helpers,
handler endpoints, task enqueue/result processing, and config loading.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Replace concrete *db.Queries and *pgxpool.Pool dependencies with
db.Querier and db.TxManager interfaces across all handlers, game hub,
and auth. This enables unit testing with mocks.
- Enable sqlc emit_interface to generate Querier interface
- Add TxManager abstraction to encapsulate transactions
- Convert auth package-level functions to Authenticator struct
- Add TaskQueueInterface/TaskWorkerInterface for game.Hub
- Add initial unit tests for game logic and API handlers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
auth/auth.go: return error instead of panicking on data inconsistency.
game/hub.go: log unexpected task result types instead of panicking.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
handling
- Wrap multi-step DB operations in transactions (signup, submit, game
edit, task result processing)
- Add game running checks to PostGamePlayCode and PostGamePlaySubmit
- Hide ranking code when game is not yet finished
- Replace silenced errors in processTaskResults with slog.Error logging
- Add pgxpool.Pool to Handler/Hub structs for transaction support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|