Skip to content

[DevEx]: Migrate remaining Options API components to script setup (batch 4 — 44 errors, → 100%) #1408

Open

Description

@itsalaidbacklife

Note

Updated 2026-10-07. Target <script setup lang="ts">, not plain <script setup> — these script blocks are rewritten line by line anyway, so writing them as TS now avoids touching every file twice. Vite transpiles lang="ts" today via esbuild with no new dependency (verified, exit 0); checking comes from vue-tsc in CI. See #1399.

Re-measured on main (71a0f2d). src/App.vue remains in the table below but its 5 errors are window.cuttle / window.Cypress globals cleared by #1403, not Options API problems — converting it is still reasonable for AGENTS.md consistency, just do not expect the count to move.

Several files here are touched by open PRs — #1378 (nines) touches GameCard.vue, CannotCounterDialog.vue, ChooseWhetherToCounterDialog.vue; #1389 touches HomeView.vue, GameListItem.vue; #1392 touches HomeView.vue. Coordinate or let them land first.

Part of #1399. Batch 4 of 4 — the tail. See #1399 for why migration is the only fix.

Scope

The remaining Options API components after #1412 takes the six smallest: 15 files, 44 errors. Nothing here is individually large; this batch exists to reach zero so the gate in #1409 can be strict.

Errors File
6 src/routes/login/LoginView.vue
5 src/App.vue †
5 src/routes/game/components/dialogs/components/ChooseTwoDialog.vue
5 src/routes/home/HomeView.vue
4 src/routes/game/components/CardListSortable.vue
4 src/routes/game/components/GameMenu.vue
2 src/routes/game/components/dialogs/components/CannotCounterDialog.vue
2 src/routes/game/components/dialogs/components/ChooseWhetherToCounterDialog.vue
2 src/routes/game/components/dialogs/components/OpponentRequestedStalemateDialog.vue
2 src/routes/game/components/GameUnavailableView.vue
2 src/routes/home/components/GameListItem.vue
2 src/routes/stats/StatsView.vue
1 src/components/BaseDialog.vue
1 src/components/PlayerReadyIndicator.vue
1 src/routes/game/components/GameCard.vue

† src/App.vue is miscategorised in this count. All 5 of its errors are the window.cuttle / window.Cypress globals handled by #1403, not Options API problems. Once #1403 lands, re-measure — App.vue may need no migration at all for type purposes, though converting it for consistency with AGENTS.md is still reasonable.

So the real target here is closer to 39 errors across 14 files.

Suggested grouping

The 1–2 error files are mostly trivial and could land as a single PR — though note BaseDialog.vue (222 lines), PlayerReadyIndicator.vue (239) and GameCard.vue (315) each carry only one error but are large enough to deserve their own review. The 4–6 error files (LoginView, ChooseTwoDialog, HomeView, CardListSortable, GameMenu) deserve individual attention.

The six smallest single-error components were split into #1412 as a first-issue on-ramp.

Acceptance

  • All listed files use <script setup>
  • Frontend error count reaches 0
  • Full Cypress suite passes
  • No behavior change

Activity

  1. added
    dev experienceImprovements to the code base that make it easier/better/more enjoyable to contribute to Cuttle
    frontendRequires changes to the frontend (vue) client
    on Oct 6, 2026
  2. changed the title [-][DevEx]: Migrate remaining Options API components to script setup (batch 4 — 50 errors, → 100%)[/-] [+][DevEx]: Migrate remaining Options API components to script setup (batch 4 — 44 errors, → 100%)[/+] on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev experienceImprovements to the code base that make it easier/better/more enjoyable to contribute to CuttlefrontendRequires changes to the frontend (vue) clientvue3 migrationUpdating the app to vue3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions