mem bank
Gitea Actions Demo / build_and_push (push) Successful in 47s Details

This commit is contained in:
artem 2026-09-04 22:21:35 +03:00
parent 9955f0d09a
commit f008d4b595
2 changed files with 30 additions and 4 deletions

View File

@ -19,7 +19,9 @@
- `vue/no-mutating-props` in `workouts/components/WorkoutItem.vue` (checkbox/name edits mutate the prop object in place) — suppressed file-targeted in `eslint.config.mjs`; proper fix = local state extraction, needs its own task.
- `src/main.ts` axios interceptors loosely typed (`any`) — suppressed file-targeted; pre-existing documented debt.
- ~~**`typescript` capped at 5.4.5** (TASK-DEPS-UPDATE-W1)~~ — **RESOLVED by W2b**: `typescript` now 5.8.3 (`"5.8"` pinned no-caret in package.json), `vue-tsc` 2.2.12 (`^2`). vue-tsc 2.x officially supports TS up to 5.8 — do NOT go to TS 5.9.
- **`sass` left at 1.69.5** (TASK-DEPS-UPDATE-W1): latest 1.x (1.104.0) requires node ≥20.19.0, baseline is node 18.19.1. Revisit on node 20 baseline or as a follow-up.
- **`sass` left at 1.69.5** (TASK-DEPS-UPDATE-W1): latest 1.x (1.104.0) requires node ≥20.19.0. Docker is now node:22, so a sass bump is viable — verify the local dev node version first; small follow-up task.
- **Stale `package-lock.json`** in repo (npm workflow abandoned for yarn in W2c-FIX) — remove as a small cleanup task.
- **yarn v1 nested-stale dirs**: after major bumps, `node_modules` can keep leftover nested packages (observed: `@typescript-eslint/*@7` under `typescript-eslint/`) causing transient CJS resolution glitches — fix with a clean `rm -rf node_modules && yarn install`; not reproducible from the lockfile.
- Installed yarn 1.22.22 binary lacks the `up` alias — use `yarn upgrade` (verified equivalent).
## Milestones
@ -91,6 +93,16 @@
- Verified: baseline green at wave start; after — `yarn lint` 0 errors, `yarn build` green (vue-tsc 0 errors, vite 5.4.21 ~5.3s), `docker build --pull --no-cache` green (image `strava-frontend-w3`, `yarn install --frozen-lockfile` clean inside image).
- No `src/` changes; `vite.config.ts`, i18n, HOST/keys untouched. W3 = FINAL wave → TASK-DEPS-UPDATE ready to close.
## Left to build
### 2026-09-05 — TASK-DEPS-UPDATE CLOSED (parent)
- (empty — filled as tasks are created)
- All waves W0a → W3 completed and Architect-verified. Final stack: vue 3.5.42, pinia 3.0.4, TS 5.8.3, vue-tsc 2.2.12, vite 5.4.21, @vitejs/plugin-vue 5.2.4, eslint 9.39.5, typescript-eslint 8.69.0, axios 1.20.0, tailwind 3.4.19, vuestic 1.10.3, node:22 (Docker). Storybook fully removed.
- End state: `yarn lint` 0 errors, `yarn build` green, `docker build` green. Runtime behavior unchanged (type-level + config + lockfile only).
- Lessons captured in `systemPatterns.md`: TS parser for `.vue` in flat eslint config; `LngLat` typing contract for vue-yandex-maps; vue-tsc 2 ↔ TS ≤5.8 ceiling; yarn-only workflow; `ban-ts-comment` enforcement.
## Left to build (small follow-ups, no urgency)
- Remove stale `package-lock.json` from the repo (npm workflow abandoned in W2c-FIX).
- Bump `sass` to latest 1.x — Docker (node:22) is ready; check local dev node ≥20.19 first.
- Consider vite 6/7 after the ecosystem settles (own breaking changes).
- `GetWorkout.ts` module-level `let` refactor to pure functions returning state.
- `components/WorkoutItem.vue` prop mutation → local state extraction (unblock the `no-mutating-props` suppression).

View File

@ -45,6 +45,8 @@ Dependency direction: `pages -> components/stores/services`. Pages own business
- Chart.js via `vue-chartjs` (+ `chartjs-adapter-moment`, `chartjs-plugin-zoom`, `chartjs-chart-geo` for elevation). Chart building lives in `src/pages/workouts/components/*.ts`.
- Yandex Maps via `vue-yandex-maps` (`createYmaps` with a hardcoded API key in `main.ts`). Route polyline drawn from workout `results` coordinates.
- **Typing contract (since vue 3.5 strict checks)**: `vue-yandex-maps` `:settings` coordinates must be the `LngLat = [lon, lat, alt?]` tuple type — plain `number[]` refs fail `vue-tsc`. Pattern: `ref<LngLat>([lon, lat])` + `as LngLat` casts in templates (see `pages/routes/Route.vue`, `pages/workouts/components/WorkoutItem.vue`).
- Custom chart controllers extend `chart.js` controllers (`LineWithLineController` in `LineWithLineChart.ts`); the map-sync plugin is read from `chart.config.plugins` by id — use non-null assertions on `chart.config.data!` (do NOT reintroduce `@ts-ignore`, lint bans it).
## Styling
@ -60,6 +62,18 @@ Dependency direction: `pages -> components/stores/services`. Pages own business
- Central axios interceptor logs and re-throws; 401 triggers logout redirect. Components typically use `.then/.catch` chains (callback style, not async/await) — keep the existing style when modifying.
## Lint / type-check pipeline
- **Flat ESLint config** (`eslint.config.mjs`, eslint 9 + typescript-eslint 8): `tseslint.configs.recommended` + `pluginVue.configs["flat/essential"]`. CRITICAL: the vue flat preset leaves espree as inner parser — the TS parser MUST be attached for `**/*.vue` via `languageOptions.parserOptions.parser` (from the `typescript-eslint` CJS default import).
- Override style: file-targeted blocks with justifying comments ONLY (no global rule disabling, no inline eslint-disable). Existing exceptions: `src/main.ts` (any/unused — interceptor debt), `src/pages/**/*.vue` (multi-word names), `Logout.vue` (valid-template-root), `workouts/components/WorkoutItem.vue` (no-mutating-props — local-state extraction pending).
- `ban-ts-comment` is enforced: `@ts-ignore` is not allowed; use `@ts-expect-error` or proper typing (non-null assertions).
- `no-unused-vars` honors `argsIgnorePattern: "^_"`.
- `yarn lint` runs `prelint: prettier --write .` — running lint auto-reformats ~30 files; commit the formatting as part of the change.
## Build / deploy
- Vite build with `vue-tsc --noEmit` type-check in `yarn build`. Docker image + `nginx.conf` for static serving; `serve -s ./dist` for CI preview.
- Vite 5 build with `vue-tsc 2 --noEmit` type-check in `yarn build`. Dev and Docker both use **yarn v1** (Docker: `node:22`, `COPY package.json yarn.lock`, `yarn install --frozen-lockfile`).
- `nginx.conf` for static serving in the image; `run.sh` launcher; `serve -s ./dist` for CI preview.
- ⚠️ Legacy `package-lock.json` is STALE and unused (Docker no longer copies it) — do not run `npm install` in this repo; removal is a separate cleanup task.
- Version ceilings (learned the hard way): **vue-tsc 2.x supports TypeScript up to 5.8 — TS 5.9 crashes it** (`Search string not found: "supportedTSExtensions"`); pin `"typescript": "5.8"` no-caret. **sass ≥1.7x latest requires node ≥20.19** — Docker (node:22) is fine; verify local dev node before bumping.
- yarn 1.22 has no `up` alias — use `yarn upgrade`.