Skip to content

fix(web,ci): issue #43 batch P3+P4 — tooling / tests / labeler (7 items) - #62

Merged
InstaZDLL merged 2 commits into
mainfrom
fix/issue-43-p3-p4-tooling
Jun 15, 2026
Merged

fix(web,ci): issue #43 batch P3+P4 — tooling / tests / labeler (7 items)#62
InstaZDLL merged 2 commits into
mainfrom
fix/issue-43-p3-p4-tooling

Conversation

@InstaZDLL

@InstaZDLL InstaZDLL commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

7 P3+P4 findings from CodeRabbit on PR #41 / issue #43. Bundled
because they all touch dev / CI infrastructure rather than runtime
code.

Changes

File Fix
web/scripts/db-migrate.ts Resolve MIGRATIONS_DIR via fileURLToPath(import.meta.url) instead of process.cwd() so the script works from the repo root post-monorepo merge
web/vitest.config.ts passWithNoTests: false — bootstrap-era convenience is now a CI footgun with 230+ tests
web/src/routes/sign-up.test.tsx +3 cases: empty display-name, password at MAX+1, name/email whitespace trim
6 route-adjacent test files React.PropsWithChildren (ambient global ref) → import type { PropsWithChildren } (explicit import)
web/src/routes/sign-in.test.ts-sign-in.test.ts TanStack Router's --prefix exclusion convention
.github/pull_request_template.md ## Summary# Summary (MD041)
.github/labeler.yml sign-in/** / sign-up/**sign-in{,/**} / sign-up{,/**} — match files at the routes root

Test plan

  • bun run typecheck clean
  • bun run lint clean
  • bun run test — 236 pass (was 233, +3 new sign-up cases)
  • prettier --check on the modified files clean

Refs

Closes 7/24 items of #43. Cumulative: 18/24 across the three batched PRs (#60 P1 + #61 P2 + this).

The 4 P0 items + 1 deferred P2 (styles.css OKLCH unification) remain. P0 was tagged in the issue as "ship with the archive PR" — verifying status as a follow-up.

Summary by CodeRabbit

Notes de version

  • Bug Fixes

    • Correction de la résolution des chemins de migration de base de données pour une exécution fiable depuis la racine du projet.
  • Tests

    • Ajout de validations au formulaire d'inscription (vérification du nom d'affichage, limite de mot de passe, suppression des espaces).
    • Amélioration de la configuration des tests pour détecter les suites manquantes.
  • Chores

    • Mise à jour des règles d'auto-labeling GitHub pour les routes d'authentification.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@InstaZDLL, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 hour, 4 minutes, and 7 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 77bf24e1-edee-4362-84d5-b6253d7e04d4

📥 Commits

Reviewing files that changed from the base of the PR and between 8feb8bb and 7300e0a.

📒 Files selected for processing (12)
  • .github/labeler.yml
  • .github/pull_request_template.md
  • web/scripts/db-migrate.ts
  • web/src/routes/-sign-in.test.ts
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.test.tsx
  • web/src/routes/_authed.profiles.$profileId.playlists.$playlistId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.playlists.test.tsx
  • web/src/routes/sign-up.test.tsx
  • web/vitest.config.ts
📝 Walkthrough

Walkthrough

Ce PR apporte : la correction de la résolution de chemin dans db-migrate.ts (via import.meta.url), le durcissement de la config Vitest (passWithNoTests: false), l'ajout de trois nouveaux tests de validation sur le formulaire sign-up, le refactoring uniforme des imports PropsWithChildren dans les tests existants, et des corrections de globs dans labeler.yml.

Changes

Tests, config Vitest, migration DB et CI

Layer / File(s) Summary
Config Vitest : passWithNoTestsfalse
web/vitest.config.ts
passWithNoTests passe de true à false ; Vitest échouera désormais si aucun fichier ne correspond aux globs include, avec commentaire mis à jour.
Résolution robuste du chemin des migrations
web/scripts/db-migrate.ts
SCRIPT_DIR dérivé via dirname(fileURLToPath(import.meta.url)) ; MIGRATIONS_DIR calculé relativement au script, corrigeant l'exécution depuis la racine du monorepo.
Nouveaux tests de validation sign-up
web/src/routes/sign-up.test.tsx
Trois nouveaux tests : blocage sur display name vide/espaces, blocage sur mot de passe > 128 caractères, et vérification que nom et email sont trimés avant l'appel signUp.email.
Refactoring PropsWithChildren dans les tests
web/src/routes/_authed.profiles.*.test.tsx
React.PropsWithChildren remplacé par un import direct de PropsWithChildren depuis react dans les mocks Link de six fichiers de tests.
Corrections CI : globs labeler et PR template
.github/labeler.yml, .github/pull_request_template.md
Globs sign-in/** et sign-up/** remplacés par sign-in{,/**} et sign-up{,/**} pour couvrir les fichiers à la racine. Header du PR template ajusté.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • #43 : Ce PR implémente directement les correctifs identifiés dans cette issue : résolution import.meta.url dans db-migrate.ts, passWithNoTests: false dans Vitest, refactoring PropsWithChildren, ajout de tests de validation sign-up, format du header PR template, et globs labeler.yml.

Poem

🎵 Plus de process.cwd() qui se perd dans le monorepo,
import.meta.url montre le bon chemin, bravo !
passWithNoTests: false — plus de fausse sécurité,
Les espaces du formulaire ? Trimés avant d'être envoyés.
Les globs {,/**} capturent enfin les fichiers racines,
Le CI chante juste, et les tests valident sans épines. 🎶

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Le titre décrit précisément les 7 éléments P3+P4 de l'issue #43 (tooling/tests/labeler), correspondant au contenu détaillé du changeset.
Description check ✅ Passed La description suit le template : résumé clair avec référence à l'issue, tableau détaillé des changements, test plan complet avec cases cochées, et notes explicatives. Tous les éléments requis sont présents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-43-p3-p4-tooling

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added type: fix Bug fix size: m 50-200 lines scope: web Embedded web player (React) scope: routes Web routes scope: tooling Build / dev tooling scope: docs Docs, README, assets and removed type: fix Bug fix labels Jun 15, 2026
@InstaZDLL

Copy link
Copy Markdown
Owner Author

@coderabbitai full review please.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR `#62` diff ==="
gh pr view 62 --repo InstaZDLL/waveflow-server --json title,body,files

echo ""
echo "=== Full diff ==="
gh pr diff 62 --repo InstaZDLL/waveflow-server

Length of output: 16430



@InstaZDLL : Revue complète effectuée. Le PR est propre — voici les observations par fichier.


.github/labeler.yml

La syntaxe {,/**} est supportée par micromatch (utilisé par l'action labeler). Elle couvre bien le fichier racine et un éventuel sous-répertoire futur. Correct.

web/scripts/db-migrate.ts

Le calcul de chemin est juste : web/scripts/../db/migrations = web/db/migrations — identique à l'ancien chemin quand le CWD était web/, mais maintenant stable quel que soit le CWD de l'appelant. Fix solide.

web/vitest.config.ts

passWithNoTests: false — le bon signal : si un glob casse la découverte, le CI échoue bruyamment plutôt que de passer silencieusement.

web/src/routes/-sign-in.test.ts (renommage)

Préfixe - pour l'exclusion TanStack Router — correct.

✅ 6 fichiers de tests — PropsWithChildren

import type { PropsWithChildren } from 'react' est l'import explicite recommandé. Pas de dépendance sur le global ambiant React. Correct.

web/src/routes/sign-up.test.tsx — 3 nouveaux cas

Cas Vérification
Nom vide (whitespace-only) Déclenche "Display name is required" + signUpEmail non appelé ✓
Mot de passe à MAX+1 (129 chars) Déclenche le message de borne supérieure + signUpEmail non appelé ✓
Trim whitespace Payload wire = valeurs trimées ✓

Un point à noter : le test « trim » passe ' daisy@example.com ' dans un champ type="email". jsdom n'applique pas la validation HTML5 sur fireEvent.change, donc ce cas fonctionne en test unitaire — mais c'est aussi ce que vous voulez tester (la logique de trim dans le composant avant l'appel réseau).


Aucun bug, problème de logique, ou regression détectés. Le PR peut être mergé.

[approve]

@InstaZDLL InstaZDLL self-assigned this Jun 15, 2026
@InstaZDLL

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions Bot added the type: fix Bug fix label Jun 15, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/labeler.yml:
- Around line 55-61: The glob patterns for sign-in and sign-up in the labeler
configuration do not match the actual .tsx files that exist. The pattern
sign-in{,/**} expands to either sign-in (directory) or sign-in/** (directory
contents) but does not include sign-in.tsx. Update the patterns for both
web/src/routes/sign-in{,/**} and web/src/routes/sign-up{,/**} to also explicitly
match the .tsx file variants so the scope: auth label is correctly applied to
both the individual sign-in.tsx and sign-up.tsx files and any future
subdirectories under those names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8f8107c2-d5aa-414f-b5fa-222f8496ac97

📥 Commits

Reviewing files that changed from the base of the PR and between 1fc6a13 and 8feb8bb.

📒 Files selected for processing (12)
  • .github/labeler.yml
  • .github/pull_request_template.md
  • web/scripts/db-migrate.ts
  • web/src/routes/-sign-in.test.ts
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.$albumId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.albums.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.$artistId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.libraries.$libraryId.artists.test.tsx
  • web/src/routes/_authed.profiles.$profileId.playlists.$playlistId.test.tsx
  • web/src/routes/_authed.profiles.$profileId.playlists.test.tsx
  • web/src/routes/sign-up.test.tsx
  • web/vitest.config.ts

Comment thread .github/labeler.yml Outdated
InstaZDLL added a commit that referenced this pull request Jun 15, 2026
Follow-up to #62 review. The previous brace expansion
`sign-in{,/**}` expanded to `sign-in` (literal — a file or dir
NAMED `sign-in`, no extension, doesn't exist) and `sign-in/**`
(subtree). Neither shape catches the actual `sign-in.tsx` file
at the routes root, so PRs touching `sign-in.tsx` or
`sign-up.tsx` were silently missing the `scope: auth` label.

`sign-in{.tsx,/**}` is the right union: matches the literal
`.tsx` file today AND any future `sign-in/` subtree (e.g.
`sign-in.callback.tsx`, `sign-in/index.tsx`). Same fix on
`sign-up`.

Validation: minimatch eval against the brace expansion gives
`sign-in.tsx` and `sign-in/**` — both real-world shapes
covered.

Signed-off-by: InstaZDLL <github.105mh@8shield.net>
@github-actions github-actions Bot added type: fix Bug fix and removed type: fix Bug fix labels Jun 15, 2026
@InstaZDLL

Copy link
Copy Markdown
Owner Author

@coderabbitai fix appliqué sur commit 8220b9f.

Tu avais raison : sign-in{,/**} expandait à sign-in (literal sans extension, inexistant) + sign-in/** (subtree). sign-in.tsx à la racine ne matchait NI l'un NI l'autre — PRs touchant les fichiers de sign-in/sign-up perdaient silencieusement le scope: auth label.

Switch à sign-in{.tsx,/**} — vraie union qui couvre le fichier actuel ET un futur subtree sign-in/ (e.g. sign-in.callback.tsx, sign-in/index.tsx). Same fix sur sign-up.

Commentaire mis à jour pour expliquer le bug de l'expansion précédente afin d'éviter qu'un futur refactor le réintroduit.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@InstaZDLL : Analyse correcte et fix propre. {,/**}"" + /** = sign-in + sign-in/**, le fichier .tsx à la racine tombait dans le vide. {.tsx,/**} couvre exactement les deux cas sans ambiguïté. Le commentaire dans le YAML est un bon garde-fou.

🐇 ʕ •ᴥ•ʔ ✓

InstaZDLL added a commit that referenced this pull request Jun 15, 2026
Follow-up to #62 review. The previous brace expansion
`sign-in{,/**}` expanded to `sign-in` (literal — a file or dir
NAMED `sign-in`, no extension, doesn't exist) and `sign-in/**`
(subtree). Neither shape catches the actual `sign-in.tsx` file
at the routes root, so PRs touching `sign-in.tsx` or
`sign-up.tsx` were silently missing the `scope: auth` label.

`sign-in{.tsx,/**}` is the right union: matches the literal
`.tsx` file today AND any future `sign-in/` subtree (e.g.
`sign-in.callback.tsx`, `sign-in/index.tsx`). Same fix on
`sign-up`.

Validation: minimatch eval against the brace expansion gives
`sign-in.tsx` and `sign-in/**` — both real-world shapes
covered.

Signed-off-by: InstaZDLL <github.105mh@8shield.net>
@InstaZDLL
InstaZDLL force-pushed the fix/issue-43-p3-p4-tooling branch from 8220b9f to c7e90a1 Compare June 15, 2026 18:15
@github-actions github-actions Bot added type: fix Bug fix and removed type: fix Bug fix labels Jun 15, 2026
7 findings from CodeRabbit on PR #41 / issue #43 — the P3 tooling
batch (6 items) + the single P4 labeler item, bundled because
they all touch dev / CI infrastructure rather than runtime code.

## Changes

- `web/scripts/db-migrate.ts` — resolve `MIGRATIONS_DIR` relative
  to the script via `fileURLToPath(import.meta.url)` instead of
  `process.cwd()`. After the monorepo merge the script can be
  invoked from the repo root (`bun --cwd=web run db:migrate`);
  the previous CWD anchor broke silently because it pointed at
  `<repo>/db/migrations`, which doesn't exist.
- `web/vitest.config.ts` — `passWithNoTests: false`. The flag
  was a bootstrap-era convenience while the suite was empty; now
  that 230+ tests are landing, a typo in the `include` glob (or
  an accidental file move that breaks discovery) would silently
  pass CI under `true`. Failing loud is the right signal.
- `web/src/routes/sign-up.test.tsx` — three new cases:
  - empty / whitespace-only display name → blocked
  - password at MAX_PASSWORD + 1 (129 chars) → blocked
  - surrounding whitespace on name + email → trimmed before
    `signUp.email` call
- Six route-adjacent test files (`sign-up.test.tsx`,
  `_authed.profiles.$profileId.libraries.$libraryId.albums*`,
  `…artists*`, `…playlists.test.tsx`,
  `…playlists.$playlistId.test.tsx`) — switch
  `React.PropsWithChildren` (which referenced the global
  `React` namespace without an `import * as React`) to a typed
  `PropsWithChildren` imported via `import type { PropsWithChildren }
  from 'react'`. The tests passed before only because the JSX
  transform happens to expose `React` ambient; the explicit
  import locks the contract and is what every other test file
  in the suite already does.
- `web/src/routes/sign-in.test.ts` → `-sign-in.test.ts` —
  TanStack Router's `-`-prefix convention excludes the file
  from the auto-generated route tree. Without the rename the
  router plugin had been incidentally treating
  `sign-in.test.ts` as a candidate route module on every dev
  reload. Kept `.ts` (not `.tsx`) because the test doesn't
  render JSX (`Link: () => null` mock).
- `.github/pull_request_template.md` — first heading `## Summary`
  → `# Summary`. MD041 (first-line-heading) wants H1; the
  template was the only file in the repo tripping it.
- `.github/labeler.yml` — `web/src/routes/sign-in/**` /
  `…sign-up/**` only matched DIRECTORIES; the actual routes are
  `sign-in.tsx` / `sign-up.tsx` files at the root of
  `routes/`. Switch to `sign-in{,/**}` / `sign-up{,/**}` so a
  PR touching either form lights up the auth label.

## Validation

- `bun run typecheck` clean.
- `bun run lint` clean.
- `bun run test` — 236 pass across 26 files (was 233, +3 new
  sign-up boundary cases).
- `prettier --check` on the modified files clean.

## Refs

Closes 7/24 items of #43. Cumulative: 18/24 across the three
batched PRs (#60 P1 + #61 P2 + this).

The 4 P0 items + 1 deferred P2 (styles.css OKLCH unification)
remain. P0 was tagged in the issue as "ship with the archive
PR" — verifying status as a follow-up.

Signed-off-by: InstaZDLL <github.105mh@8shield.net>
Follow-up to #62 review. The previous brace expansion
`sign-in{,/**}` expanded to `sign-in` (literal — a file or dir
NAMED `sign-in`, no extension, doesn't exist) and `sign-in/**`
(subtree). Neither shape catches the actual `sign-in.tsx` file
at the routes root, so PRs touching `sign-in.tsx` or
`sign-up.tsx` were silently missing the `scope: auth` label.

`sign-in{.tsx,/**}` is the right union: matches the literal
`.tsx` file today AND any future `sign-in/` subtree (e.g.
`sign-in.callback.tsx`, `sign-in/index.tsx`). Same fix on
`sign-up`.

Validation: minimatch eval against the brace expansion gives
`sign-in.tsx` and `sign-in/**` — both real-world shapes
covered.

Signed-off-by: InstaZDLL <github.105mh@8shield.net>
@InstaZDLL
InstaZDLL force-pushed the fix/issue-43-p3-p4-tooling branch from c7e90a1 to 7300e0a Compare June 15, 2026 18:19
@github-actions github-actions Bot added type: fix Bug fix and removed type: fix Bug fix labels Jun 15, 2026
@InstaZDLL
InstaZDLL merged commit f9204df into main Jun 15, 2026
7 checks passed
@InstaZDLL
InstaZDLL deleted the fix/issue-43-p3-p4-tooling branch June 15, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs Docs, README, assets scope: routes Web routes scope: tooling Build / dev tooling scope: web Embedded web player (React) size: m 50-200 lines type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant