refactor: remove unused knobs, strings and stale text

Drop what nothing uses any more: the --max-syllables flag with its
sourceSpec field, meta row and reject reason; the store's clearRejection;
the --gap CSS token; three orphaned i18n strings; two exports with no
importer; the preview npm script; the proto.yml "baseline exists" step
that has been unconditionally true since the schema landed on main; and
two root-level .gitignore entries for paths Playwright never writes.

Correct text that outlived its subject: NOTICE named a tools/ directory
that never existed, the README still pointed at the first plan and
carried a migration note for retired sources, and a few comments still
said "release" for an upstream that is a weekly export. The pin test
header now says three copies and also holds README and ATTRIBUTION to
the same URL; the Make-targets table lists clean and help.

Wire fixtures regenerated so client_hello uses the ProtocolVersion
constant and server_game_started carries the 30s turn limit.
builder_version becomes 4 for the dropped meta row.
This commit is contained in:
tiennm99 committed 2026-09-08 18:01:37 +07:00
1 parent 805cbca39b
commit 557de1af94
22 files changed
+66 -111

No files matched your search

+1 -3
View File
@@ -56,7 +56,7 @@ export const ONE_SYLLABLE_WORD = 'sinh';
* an unhelpful "game_start_failed". Asserting it here turns that into a
* sentence a reader can act on.
*/
export const HUB_SYLLABLE = 'sinh';
const HUB_SYLLABLE = 'sinh';
const MIN_OPENING_OUT_DEGREE = 20;
const hubContinuations = (byFirstSyllable.get(HUB_SYLLABLE) ?? []).length;
@@ -66,5 +66,3 @@ if (hubContinuations < MIN_OPENING_OUT_DEGREE) {
`the server needs ${MIN_OPENING_OUT_DEGREE} before it will open a game on that syllable`
);
}
export { words };
-1
View File
@@ -6,7 +6,6 @@
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"test": "vite build && vitest run",
-1
View File
@@ -30,7 +30,6 @@
--radius: 12px;
--radius-sm: 8px;
--gap: 12px;
--font: system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
color-scheme: light;
-3
View File
@@ -34,12 +34,10 @@ export const t = {
you: 'Bạn',
opponent: 'Đối thủ',
someone: 'Người chơi',
scoreLabel: 'Điểm',
syllableUnit: 'tiếng',
correctedFrom: 'Bạn gõ “{typed}”, từ đúng là “{word}”.',
secondsLeft: '{n} giây',
waiting: 'Đang chờ…',
connecting: 'Đang kết nối…',
connected: 'Đã kết nối',
reconnecting: 'Mất kết nối, đang thử lại…',
@@ -77,7 +75,6 @@ export const t = {
copyLink: 'Sao chép liên kết mời',
shareLink: 'Chia sẻ',
copied: 'Đã sao chép',
waitingForOpponent: 'Đang chờ người chơi vào phòng…',
leaveRoom: 'Rời phòng',
shareInvite: 'Vào chơi nối từ với tôi',
-3
View File
@@ -492,9 +492,6 @@ export function createGameStore() {
);
},
clearRejection() {
state.rejection = null;
},
clearError() {
state.error = null;
},
+1 -1
View File
@@ -39,7 +39,7 @@ export const LIVENESS_TIMEOUT_MS = 3 * PING_INTERVAL_MS;
* client reconnects every half second forever after a deploy that bumps the
* protocol.
*/
export const TERMINAL_ERROR_CODES = new Set(['protocol_version_mismatch']);
const TERMINAL_ERROR_CODES = new Set(['protocol_version_mismatch']);
const RESUME_KEY = 'noitu.resumeToken';
+14 -5
View File
@@ -1,10 +1,12 @@
// The upstream dictionary URL lives in two places: the Makefile, which builds
// it for a developer, and the Dockerfile, which builds it for the image. They
// have to agree, or the container ships a wordlist nobody tested against.
// The upstream dictionary URL lives in three places: the Makefile, which
// builds it for a developer, the Dockerfile, which builds it for the image, and
// the builder, which stamps it into the database. They have to agree, or the
// container ships a wordlist nobody tested against. The docs that quote the
// URL are held to the same copy.
//
// This lives in the JavaScript suite for no better reason than that it is the
// suite that already reads other files in the repository. It is checking two
// build files, not the frontend.
// suite that already reads other files in the repository. It is checking build
// files and docs, not the frontend.
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
@@ -49,4 +51,11 @@ describe('the upstream dictionary export', () => {
const builderUrl = pin(builder, /kaikkiSourceURL\s*=\s*"([^"]+)"/, 'kaikkiSourceURL in the builder');
expect(builderUrl).toBe(makeUrl);
});
it('is the URL the docs quote', () => {
for (const rel of ['../../README.md', '../../data/ATTRIBUTION.md']) {
const doc = readFileSync(fileURLToPath(new URL(rel, import.meta.url)), 'utf8');
expect(doc, `${rel} does not quote DICT_URL`).toContain(makeUrl);
}
});
});