Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ npm run test
npm run lint
```

### Type Check

```bash
npm run type-check
```

> **Note on Next.js 16 & ESLint:** Starting with Next 16, `next lint` is removed. Use the ESLint CLI driven by `eslint-config-next` (flat config). Remove any `eslint` options from `next.config.*`. ([Next.js][1])

---
Expand All @@ -43,19 +37,10 @@ Run all the following (unless you are only editing docs or non-code, in which ca
```bash
npm run test
npm run lint
npm run type-check
```

For small changes, you may run a faster coverage subset:

```bash
npm run test:cov:changed
```

* `npm run test`: Executes all Jest tests and enforces **≥ 80% line coverage for files changed since `main`**. Fails if tests fail or coverage threshold is not met.
* `npm run test:cov:changed`: Jest on changed files only; still enforces the 80% threshold.
* `npm run lint`: Code must satisfy ESLint (Next’s Core Web Vitals + React Hooks).
* `npm run type-check`: Must pass `tsc --noEmit`.

If tests fail due to coverage, write meaningful tests until coverage ≥ 80%. If a test fails functionally, fix root cause (code or test) and re‑run until green.

Expand Down
15 changes: 0 additions & 15 deletions GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ npm run test
npm run lint
```

### Type Check

```bash
npm run type-check
```

> **Note on Next.js 16 & ESLint:** Starting with Next 16, `next lint` is removed. Use the ESLint CLI driven by `eslint-config-next` (flat config). Remove any `eslint` options from `next.config.*`. ([Next.js][1])

---
Expand All @@ -45,19 +39,10 @@ Run all the following (unless you are only editing docs or non-code, in which ca
```bash
npm run test
npm run lint
npm run type-check
```

For small changes, you may run a faster coverage subset:

```bash
npm run test:cov:changed
```

* `npm run test`: Executes all Jest tests and enforces **≥ 80% line coverage for files changed since `main`**. Fails if tests fail or coverage threshold is not met.
* `npm run test:cov:changed`: Jest on changed files only; still enforces the 80% threshold.
* `npm run lint`: Code must satisfy ESLint (Next’s Core Web Vitals + React Hooks).
* `npm run type-check`: Must pass `tsc --noEmit`.

If tests fail due to coverage, write meaningful tests until coverage ≥ 80%. If a test fails functionally, fix root cause (code or test) and re‑run until green.

Expand Down
2 changes: 0 additions & 2 deletions __tests__/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ Prioritise high-risk areas first when time-boxed.
## Running Tests

```bash
npm run test:cov:changed # changed files only
npm run test # full suite
npm run lint
npm run type-check
```

---
Expand Down
4 changes: 1 addition & 3 deletions app/api/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ files under `app/api/`.
## Quality Gates

- All changes must pass the same commands listed in the top-level `AGENTS.md`:
`npm run test`, `npm run lint`, and `npm run type-check` (or the targeted
`test:cov:changed` when appropriate).

`npm run test` and `npm run lint`.
8 changes: 4 additions & 4 deletions codex/tickets/TKT-0009.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ title: Refactor Brain notifications shell for modular clarity
- [x] Extract data/side-effect orchestration into a dedicated Notifications hook layer.
- [x] Extract presentational state rendering into focused subcomponents.
- [x] Rebuild the main Notifications shell to compose the new modules with unchanged API.
- [ ] Run type-check and lint to confirm no regressions. _(Blocked by existing repository failures; see log.)_
- [ ] Run TypeScript checks and lint to confirm no regressions. _(Blocked by existing repository failures; see log.)_

## Acceptance

- [ ] `components/brain/notifications/index.tsx` acts as the main shell and wires data/hooks → subcomponents.
- [ ] New hooks/subcomponents/utilities live under `components/brain/notifications/{hooks,subcomponents,utils}` and keep runtime behaviour identical.
- [ ] Existing imports of `Notifications` continue to work via stable exports.
- [ ] `npm run type-check` and `npm run lint` succeed after the refactor.
- [ ] `npm run lint` succeeds after the refactor.

## Links

Expand All @@ -35,6 +35,6 @@ title: Refactor Brain notifications shell for modular clarity

- 2025-10-15T08:34:17Z – Created ticket and drafted refactor plan.
- 2025-10-15T08:35:49Z – Outlined modular breakdown: main shell in `index.tsx`, hook layer (`useNotificationsController`, `useNotificationsScroll`), presentational states (`NotificationsContent`, `NotificationsStateMessage`), and error utilities.
- 2025-10-15T09:44:55Z – Refactored Notifications into modular files, attempted type-check/lint (failing due to pre-existing repository issues).
- 2025-10-15T09:44:55Z – Refactored Notifications into modular files, attempted TypeScript checks/lint (failing due to pre-existing repository issues).
- 2025-10-15T10:56:58Z – Hardened mark-all-as-read success handler against context cleanup failures.
- 2025-10-16T07:48:38Z – Removed unicode regex flag from `OpenGraphPreview` to restore compatibility with current TS target; type-check attempt still blocked by existing test typing failures.
- 2025-10-16T07:48:38Z – Removed unicode regex flag from `OpenGraphPreview` to restore compatibility with current TS target; TypeScript check attempt still blocked by existing test typing failures.
4 changes: 2 additions & 2 deletions codex/tickets/TKT-0010.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ title: Refactor WaveDropsAll component for modular clarity
- [x] Draft modular breakdown covering subcomponents, hooks, and utilities aligned with the repo conventions.
- [x] Extract the new modules under `components/waves/drops/` while keeping behaviour and props stable.
- [x] Update the Wave Drops index composition shell to wire props → hooks → presentational pieces.
- [x] Run lint, type-check, and relevant tests to validate the refactor (currently failing upstream issues recorded below).
- [x] Run lint and relevant tests to validate the refactor (currently failing upstream issues recorded below).

## Acceptance

Expand All @@ -36,7 +36,7 @@ title: Refactor WaveDropsAll component for modular clarity

- 2025-10-22T10:06:43Z – Ticket created for the WaveDropsAll modular refactor.
- 2025-10-22T10:11:24Z – Audited existing component logic and drafted breakdown: serial scroll controller hook, notification read hook, content and list subcomponents, and shared delay utility under `wave-drops-all/`.
- 2025-10-22T10:21:05Z – Extracted WaveDrops shell into `wave-drops-all/` modules (serial scroll hook, content/typing subcomponents, notification effect) and re-exported the stable entry point; `npm run test`, `npm run lint`, and `npm run type-check` were executed—each failing due to pre-existing test, lint, and type errors (e.g., drop Markdown link handler tests, lint unused imports in brain desktop, and TypeScript issues in legacy test suites).
- 2025-10-22T10:21:05Z – Extracted WaveDrops shell into `wave-drops-all/` modules (serial scroll hook, content/typing subcomponents, notification effect) and re-exported the stable entry point; `npm run test` and `npm run lint` were executed—each failing due to pre-existing test, lint, and type errors (e.g., drop Markdown link handler tests, lint unused imports in brain desktop, and TypeScript issues in legacy test suites).
- 2025-10-22T10:27:09Z – Removed legacy `components/waves/drops/WaveDropsAll.tsx` proxy and updated app/tests to import directly from `components/waves/drops/wave-drops-all`.
- 2025-10-22T11:07:16Z – Fixed WaveDrops content regression by gating the empty placeholder until virtualized drops hydrate; added Jest coverage for the loading state. `npm run test -- --runTestsByPath __tests__/components/waves/drops/WaveDropsAll.test.tsx` still fails on the existing onUserScroll assertion.
- 2025-10-22T11:18:04Z – Updated `parseSeizeQuoteLink` to accept both serial number and drop-based quote URLs and expanded unit tests (`npm run test -- --runTestsByPath __tests__/helpers/SeizeLinkParser.test.ts`) to cover the additional cases.
Expand Down
6 changes: 3 additions & 3 deletions codex/tickets/TKT-0012.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ title: Refactor wave group edit buttons for modular clarity
- [x] Audit existing component structure, state and handler responsibilities.
- [x] Propose modular breakdown across subcomponents, hooks, and helpers aligned with project conventions.
- [x] Implement refactor with behaviour parity and updated imports/exports.
- [ ] Validate via linting, type-checks, and targeted tests as required.
- [ ] Validate via linting and targeted tests as required.

## Acceptance

- [ ] `WaveGroupEditButtons` rebuilt as a composition shell delegating to extracted modules.
- [ ] Behaviour, styling, and TypeScript typings remain unchanged.
- [ ] Tests, lint, and type-check commands succeed without new warnings.
- [ ] Tests and lint commands succeed without new warnings.

## Links

Expand All @@ -33,7 +33,7 @@ title: Refactor wave group edit buttons for modular clarity
## Log

- 2025-10-16T00:00:00Z – Ticket drafted and initial component audit started.
- 2025-10-16T01:00:00Z – Extracted hooks/subcomponents/utils, updated exports; type-check blocked by existing repo errors.
- 2025-10-16T01:00:00Z – Extracted hooks/subcomponents/utils, updated exports; TypeScript checks blocked by existing repo errors.
- 2025-10-16T01:30:00Z – Consolidated controller naming and modal handling via enum-driven API.
- 2025-10-16T02:30:00Z – Synced group edit form with excluded identity data to surface both lists in edit mode.
- 2025-10-16T02:50:00Z – Hydrated wallet upload state from incoming props so both include/exclude panels show existing counts.
Expand Down
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0015.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ title: Unify header search results
- [x] Exact query matches appear before partial matches in the header search results.
- [x] Categories in the header search modal are ordered by ascending result counts.
- [x] Desktop header search modal maintains fixed tab and results widths with truncated primary text to avoid column shifts.
- [x] Relevant tests are updated or added, and `npm run test`, `npm run lint`, and `npm run type-check` pass.
- [x] Relevant tests are updated or added, and `npm run test` and `npm run lint` pass.

## Links

Expand Down
10 changes: 5 additions & 5 deletions codex/tickets/TKT-0016.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ title: Upgrade Next.js app to version 16

- [x] Run the Next.js 16 upgrade automation and review generated diffs.
- [x] Address any manual follow-ups required by the codemod.
- [x] Validate the application by running tests, lint, and type-check.
- [x] Validate the application by running tests, lint, and TypeScript checks.

## Acceptance

- [x] `next` and related dependencies updated to version 16 and app boots locally.
- [x] `npm run test`, `npm run lint`, and `npm run type-check` pass without errors.
- [x] `npm run test` and `npm run lint` pass without errors.
Comment thread
simo6529 marked this conversation as resolved.
- [x] Documented the upgrade outcome and any required follow-ups.

## Links
Expand All @@ -30,9 +30,9 @@ title: Upgrade Next.js app to version 16

- 2025-10-27T12:46:40Z – Ticket opened to track the Next.js 16 upgrade.
- 2025-10-27T12:58:02Z – Ran the official Next.js codemod (upgrade latest); dependencies bumped and middleware renamed to proxy.tsx pending follow-up checks.
- 2025-10-27T13:19:35Z – Completed lint config migration and scripts updates; lint/type-check green but `npm run test` now fails across multiple suites under React 19 assertions (e.g., stricter accessibility expectations).
- 2025-10-28T05:33:50Z – Re-ran `npm run test`; 7 suites/14 tests still failing (e.g., `CommonProfileSearchItem` alt text expectation). `npm run lint` and `npm run type-check` succeed with warnings only.
- 2025-10-28T06:01:42Z – Addressed React 19/Headless UI test updates (profile search, dropdowns, wave group controllers, tab overflow); mocks now align with TanStack v5 APIs. `npm run test`, `npm run lint`, and `npm run type-check` all pass (lint warnings persist).
- 2025-10-27T13:19:35Z – Completed lint config migration and scripts updates; lint/TypeScript checks green but `npm run test` now fails across multiple suites under React 19 assertions (e.g., stricter accessibility expectations).
- 2025-10-28T05:33:50Z – Re-ran `npm run test`; 7 suites/14 tests still failing (e.g., `CommonProfileSearchItem` alt text expectation). `npm run lint` and TypeScript checks succeed with warnings only.
- 2025-10-28T06:01:42Z – Addressed React 19/Headless UI test updates (profile search, dropdowns, wave group controllers, tab overflow); mocks now align with TanStack v5 APIs. `npm run test` and `npm run lint` pass (lint warnings persist).
- 2025-10-28T18:37:00Z – Resolved Next.js 16 image quality warnings by whitelisting `[100, 75]` in `images.qualities`; validated via Next Devtools MCP (warnings cleared on reload).
- 2025-10-28T18:55:00Z – Noticed `UserPageIdentityStatements` crashing on route transitions when `useParams().user` resolves to `undefined` while Next.js swaps segments.
- 2025-10-28T19:15:00Z – Explicitly gated the React Query call so it only fires once a user handle exists; navigation away no longer triggers the crash (Jest change-set run still red on unrelated suites).
Expand Down
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0019.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ title: Make Wave card fully clickable
- 2025-10-27T12:09:23Z – Retried `250x250` for the hero (keeping avatars on `AUTOx50`) per latest request.
- 2025-10-27T12:12:45Z – Restored the hero image scale to `AUTOx450` to ensure the CDN-served asset renders reliably.
- 2025-10-27T14:06:24Z – Moved the Wave avatar/handle/level row below the hero image and above the meta bar to match the requested layout.
- 2025-10-28T18:25:00Z – Resolved nested anchor hydration errors by converting the card container to an accessible div-based link surrogate; lint/type-check succeeded, full test suite still blocked by pre-existing `UserAgentSanitizer` ReDoS timing failure.
- 2025-10-28T18:25:00Z – Resolved nested anchor hydration errors by converting the card container to an accessible div-based link surrogate; lint/TypeScript checks succeeded, full test suite still blocked by pre-existing `UserAgentSanitizer` ReDoS timing failure.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0020.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ title: Harden CustomTooltip positioning robustness
## Acceptance

- [ ] `CustomTooltip` maintains existing hover/focus behaviour on desktop and touch devices.
- [ ] Tests, lint, and type-check suites pass without new regressions.
- [ ] Tests and lint suites pass without new regressions.
- [ ] Manual smoke test confirms initial hover positioning anchors correctly.

## Links
Expand Down
6 changes: 3 additions & 3 deletions codex/tickets/TKT-0021.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ title: Restore Discover create wave modal
- [ ] Clicking `Create Wave` on Discover opens the modal overlay and leaves the list view visible.
- [ ] Closing/success from the modal clears the `create` query parameter and returns to the list.
- [ ] `Create DM` button continues to open its modal.
- [ ] `npm run lint`, `npm run type-check`, and targeted tests succeed when run.
- [ ] `npm run lint` and targeted tests succeed when run.

## Links

Expand All @@ -33,8 +33,8 @@ title: Restore Discover create wave modal

- 2025-10-29T07:06:06Z – Created ticket and triaged regression scope.
- 2025-10-29T07:08:01Z – Wired `CreateWaveModal` back into `Waves` for web, keeping inline create for app, and ran `npm run lint`.
- 2025-10-29T07:10:05Z – Confirmed `npm run type-check` and `npm run test:cov:changed` pass (pre-existing console warnings only).
- 2025-10-29T07:10:05Z – Confirmed targeted Jest coverage tests pass (pre-existing console warnings only).
- 2025-10-29T07:15:11Z – Resolved nested link warning by making the card container a focusable div with keyboard/middle-click routing and re-ran checks.
- 2025-10-29T07:48:13Z – Restored outer `<Link>` semantics with internal button replacements, updated contributor avatars to use buttons, adjusted tests, and reran lint/type-check/tests.
- 2025-10-29T07:48:13Z – Restored outer `<Link>` semantics with internal button replacements, updated contributor avatars to use buttons, adjusted tests, and reran lint/tests.
- 2025-10-29T08:22:29Z – Added missing `"use client"` directive to `WaveItemDropped` per hook usage guidance.
- 2025-10-29T08:50:18Z – Resolved merge conflicts after rebase so modal work stays unblocked.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0027.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ title: Remove unused isMintDayDate helper export
## Log

- 2025-10-28T16:10:40Z – Ticket opened to track removal of the unused `isMintDayDate` export flagged by Knip.
- 2025-10-28T16:12:43Z – Confirmed helper is internal-only, removed export, updated README, and ran lint/type-check/test:cov:changed.
- 2025-10-28T16:12:43Z – Confirmed helper is internal-only, removed export, updated README, and ran lint/TypeScript checks/coverage tests.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0028.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Knip reports the `getCollectionBaseBreadcrums` export from `components/nextGen/n
- 2025-10-28T16:27:57Z – Ticket opened to validate and clean up unused helper export reported by Knip.
- 2025-10-28T16:28:32Z – Searched repository; helper is only referenced in tests, so plan is to remove helper and associated test coverage.
- 2025-10-28T16:32:33Z – Removed `getCollectionBaseBreadcrums` helper and deleted the now-redundant Jest tests.
- 2025-10-28T16:32:37Z – Ran `npm run test:cov:changed` (pass after extending timeout) and `npm run type-check`; `npm run lint` still fails due to pre-existing rule violations unrelated to this change.
- 2025-10-28T16:32:37Z – Ran targeted Jest coverage tests (pass after extending timeout) and TypeScript checks; `npm run lint` still fails due to pre-existing rule violations unrelated to this change.
Comment thread
simo6529 marked this conversation as resolved.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0029.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ title: Remove unused immediatelyNextMintInstantUTC helper
## Log

- 2025-10-28T00:00:00Z – Ticket opened to track removal of the unused `immediatelyNextMintInstantUTC` export flagged by Knip.
- 2025-10-28T00:15:00Z – Confirmed helper only used internally, converted to private function, updated README, and ran eslint (scoped), type-check, and test:cov:changed.
- 2025-10-28T00:15:00Z – Confirmed helper only used internally, converted to private function, updated README, and ran eslint (scoped), TypeScript checks, and targeted Jest coverage tests.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0030.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ title: Remove unused getNextMintNumber helper
## Log

- 2025-10-28T16:40:31Z – Ticket opened to validate and remove the `getNextMintNumber` helper flagged by Knip as unused.
- 2025-10-28T16:45:37Z – Confirmed helper unused outside tests, deleted export, removed associated tests/docs, trimmed unused NextGen import to clear lint, and ran `npm run test:cov:changed`, `npm run lint`, and `npm run type-check` successfully.
- 2025-10-28T16:45:37Z – Confirmed helper unused outside tests, deleted export, removed associated tests/docs, trimmed unused NextGen import to clear lint, and ran targeted Jest coverage tests and `npm run lint` successfully.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0032.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ title: Remove unused hasMetadataContent export
## Log

- 2025-10-28T16:51:08Z – Ticket created for export cleanup and initial investigation queued.
- 2025-10-28T16:55:57Z – Confirmed helper is only used internally, dropped the export, pruned the dedicated tests, and validated with test, lint, and type-check runs.
- 2025-10-28T16:55:57Z – Confirmed helper is only used internally, dropped the export, pruned the dedicated tests, and validated with test and lint runs.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0033.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ title: Remove unused createIcsDataUrl helper
## Log

- 2025-10-28T17:15:00Z – Ticket created for investigating the unused export flag raised by Knip.
- 2025-10-28T17:45:00Z – Confirmed the helper is only used within the module, dropped the export, refreshed the README summary, and validated with targeted lint, related Jest suites, and a full type-check.
- 2025-10-28T17:45:00Z – Confirmed the helper is only used within the module, dropped the export, refreshed the README summary, and validated with targeted lint, related Jest suites, and a full TypeScript check.
2 changes: 1 addition & 1 deletion codex/tickets/TKT-0034.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Knip's unused exports report flags `contexts/wave/utils/wave-messages-utils.ts#f

- 2025-10-28T17:03:12Z – Ticket opened to investigate the unused export flagged by Knip.
- 2025-10-28T17:08:30Z – Confirmed helper only had local usage, removed export, and refreshed tests to cover `fetchLightWaveMessages` behaviour.
- 2025-10-28T17:11:01Z – Ran `npm run test`, `npm run lint`, and `npm run type-check` to verify the cleanup.
- 2025-10-28T17:11:01Z – Ran `npm run test` and `npm run lint` to verify the cleanup.
Loading