feat(dashboards): DashboardApp factory + all 8 dashboard migrations - #182
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds a DashboardApp framework (types, lifecycle, readiness probes, PID/log/port handling, detached spawn, launchd integration, commander wiring, interactive menus, port-conflict detection) plus Azure CLI az login suggestion helpers, and adopts the framework across Clarity, Shops, Claude, YouTube, REAS, dashboard tooling, and dev-dashboard. It also adds a small devDependency and updates dashboard web path aliases. ChangesDashboardApp Framework and CLI Integration
🎯 4 (Complex) | ⏱️ ~45 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Code Review
This pull request introduces a robust DashboardApp utility to standardize the lifecycle management of long-running processes, including improved signal handling, orphan process prevention, and readiness probes. Several CLI tools have been refactored to use this utility, and az login guidance has been improved. Additionally, Vite configuration now includes cache directory isolation to prevent collisions. I recommend addressing the reviewer's feedback regarding error logging in the tools file to improve debuggability.
There was a problem hiding this comment.
Actionable comments posted: 22
🤖 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 `@src/azure-devops/lib/ado-configure.ts`:
- Around line 13-15: The catch block currently swallows the original error;
change it to capture the exception (e.g., catch (err)) and preserve it when
rethrowing by either logging it with logger.debug()/logger.warn() and/or passing
it as the Error cause (new Error(`Azure CLI not logged in...`, { cause: err }))
while still including the azLoginSuggestionBlock() text; reference the existing
throw and azLoginSuggestionBlock() so you update the same spot to both log the
caught error and chain it into the thrown Error.
In `@src/azure-devops/README.md`:
- Around line 139-143: The new fenced code block for the Azure DevOps login
command lacks surrounding blank lines (MD031); update the paragraph that
contains the az login example so there is an empty line before the opening
```bash fence and an empty line after the closing ``` fence to separate the code
block from surrounding prose (look for the sentence "use the interactive browser
flow with the Azure DevOps scope:" and the fenced block containing the az login
command and add blank lines accordingly).
In `@src/clarity/index.ts`:
- Around line 23-36: The Vite existence checks (variables uiDir, configPath,
viteEntry and their existsSync guards) must be removed from the global module
initialization and relocated into the code path that runs only for the
dashboard/ui command (the dashboard preflight/start handler or the function that
executes the "clarity ui" command). Specifically, delete the current top-level
guards and add the same checks inside the dashboard/ui command startup routine
(e.g., the dashboard preflight or startDashboard function) so that only the UI
command checks for Vite and exits on missing viteEntry or configPath.
- Around line 59-61: The file currently calls program.parse(...) which bypasses
the repo-wide CLI contract; keep program.addCommand(clarityUi.commanderCommand)
but remove the direct program.parse call and instead terminate the entrypoint
with await runTool(program, { tool: "clarity" }); (import runTool from
`@app/utils/cli` if not present) so the shared flags/help/console resolution are
applied.
In `@src/utils/DashboardApp/commander.ts`:
- Around line 106-107: The option parser for "-n, --lines <n>" currently returns
NaN for non-numeric input and propagates invalid values into the action (flags:
{ lines?: number }); update the option definition parser to validate the parsed
value and fail fast (throw or return an InvalidOptionArgumentError) when
Number.parseInt(v, 10) yields NaN so the command never receives an invalid lines
value; apply the same fix to the other numeric option parser referenced at the
second occurrence (the option at lines 114-115).
- Around line 36-43: The toUpOptions function currently converts flags.port
using Number.parseInt which can yield NaN and be passed to up() as a "defined"
port; update toUpOptions to validate flags.port after parsing (e.g., parseInt
with radix 10 then check Number.isFinite or Number.isNaN) and throw or return a
clear error when the input is not a valid integer port (or set it to undefined
only when no port was provided), so invalid `--port` values are rejected early
and up() never receives NaN.
In `@src/utils/DashboardApp/detach.ts`:
- Around line 31-39: The openSync call creates logFd which must be closed even
if spawn throws; wrap the spawn/child.unref() sequence in a try/finally so
closeSync(logFd) runs in the finally block. Concretely, declare logFd with
openSync(opts.logFile, "a"), then in a try block call spawn(opts.cmd[0],
opts.cmd.slice(1), { cwd: opts.cwd, env: { ...process.env,
...filterUndefined(opts.env) }, detached: true, stdio: ["ignore", logFd, logFd]
}) and call child.unref(); and in the finally block always call
closeSync(logFd). Ensure you adjust variable scope (e.g., let child) so
child.unref() is called only when spawn succeeded.
In `@src/utils/DashboardApp/index.ts`:
- Around line 21-22: The source comment contains an absolute local path
'/Users/Martin/.claude/plans/golden-wandering-pillow.md' which leaks local
environment info; update the comment in src/utils/DashboardApp/index.ts by
removing the absolute path or replacing it with a repo-relative reference (e.g.,
docs/golden-wandering-pillow.md) or a generic pointer to the design doc, keeping
the rest of the comment intact.
In `@src/utils/DashboardApp/launchd.ts`:
- Around line 13-15: Ensure the ~/Library/LaunchAgents directory exists before
writing the plist and include any stderr output when throwing load errors:
before calling writeFileSync(path, plist) (and the other writeFileSync in the
file) create the parent directory with fs.mkdirSync(join(homedir(), "Library",
"LaunchAgents"), { recursive: true }) so ENOENT is avoided, and when invoking
launchctl (the code that runs the load/unload commands) capture stderr from the
child process and include it in the thrown Error (e.g., append stderr to the
error message) so invalid plist failures are actionable.
In `@src/utils/DashboardApp/lifecycle.ts`:
- Around line 364-383: The printStatus function (and the other stdout writes
around the same file at the blocks referenced) currently calls
process.stdout.write; replace those direct stdout writes with the project stdout
helper out.result() so all user-facing output uses the standard writer. Locate
the calls in printStatus (the final
process.stdout.write(`${lines.join("\n")}\n`) ), and the similar
process.stdout.write usages around the other blocks (the ones at the review
note: ~lines 435-436 and ~463-466), change them to out.result(lines.join("\n"))
or out.result(string) as appropriate, and ensure the module imports/has access
to the out object used elsewhere in the file (or add the import if missing).
- Around line 498-504: The isProcessAlive(pid: number) function currently uses a
bare catch which hides error details; change the catch to capture the error
(e.g., catch (err)) and log the error with context using the repository logger
(use the existing logger variable in this module, e.g., logger.debug or
logger.warn) before returning false so the failure to probe a PID is recorded;
ensure the log message includes the PID and the error object for debugging while
preserving the function's boolean return behavior.
- Around line 229-243: The conflict menu and return value in handleMineMenu use
ctx.port instead of the effective port resolved by up(), causing --port
overrides to be ignored; update handleMineMenu to accept and use the effective
port (replace references to ctx.port with the passed-in effective port and
ensure promptMineMenu is called with that port) and update callers (e.g., where
up() invokes handleMineMenu) to pass the resolved port so the printed conflict
message and returned UpResult.port reflect the user-specified/overridden port.
- Around line 452-466: Sanitize the user-supplied opts.lines before using it:
compute a sanitized positive integer (e.g., requestedSanitized =
Number.isFinite(opts.lines) ? Math.max(1, Math.floor(opts.lines)) : 200) and use
that everywhere instead of requested; likewise compute readBytes with a safe cap
(e.g., Math.min(MAX_READ_BYTES, Math.max(8_192, requestedSanitized * 200))) so
Buffer.alloc/readSync never receive 0, negative, NaN or excessively large sizes.
Update references to requested -> requestedSanitized and readBytes ->
readBytesSanitized in the block (the variables around Buffer.alloc, readSync,
allLines.slice, and tail generation) and choose a reasonable MAX_READ_BYTES to
prevent huge allocations.
In `@src/utils/DashboardApp/menu.ts`:
- Around line 87-107: The cancel behavior in promptDependencyStart is wrong:
treat a user cancel as an abort sentinel instead of "skip". Add "abort" to the
DependencyMenuChoice union, change promptDependencyStart to return "abort" when
isCancel(picked) is true (instead of "skip"), and update the caller in
src/utils/DashboardApp/lifecycle.ts to stop the startup flow when
promptDependencyStart returns "abort" (handle the "abort" sentinel and
exit/return early rather than proceeding). Ensure all call sites and types are
updated to accept the new "abort" value.
In `@src/utils/DashboardApp/preferences.ts`:
- Around line 31-33: The bare catch in src/utils/DashboardApp/preferences.ts
should be changed to capture the thrown error and log context; replace the empty
catch block with catch (err) { logger.warn(`Failed to parse preferences file
${prefsPath} for key ${key}: ${err}`) } (or logger.debug if you prefer verbose
output) so parse failures are logged with file/key context and the actual error;
ensure you reference the same variables used in the surrounding function (e.g.,
prefsPath, key or fileName) and do not rethrow so the caller behavior remains
unchanged.
- Around line 38-42: writePreferences currently writes merged prefs to the path
returned by configFilePath(key) without ensuring the target directory exists,
which can cause ENOENT; before calling writeFileSync in writePreferences,
compute the directory for the file (use dirname on the path returned by
configFilePath(key)) and create it with a recursive mkdir (e.g.,
fs.mkdirSync(dir, { recursive: true })) so the directory is present, then
proceed to write the file; reference writePreferences and configFilePath to
locate the change.
In `@src/utils/DashboardApp/readiness.ts`:
- Around line 65-73: The catch block after the fetch call currently swallows all
errors; change it to capture the thrown error (e.g., catch (err)) and call
logger.debug or logger.warn with that error, and store the lastError so that
when the timeout path returns its detail it includes the last error message;
update the readiness polling logic around the fetch/AbortSignal.timeout call
(the block using fetch(url, { redirect: "manual", signal:
AbortSignal.timeout(2_000) })) to record the caught error and include it in the
returned timeout detail instead of returning an opaque timeout.
- Around line 101-102: The readiness check uses probe.regex.test(acc) which can
be affected by a RegExp with the global or sticky flags because test() mutates
lastIndex; fix by resetting probe.regex.lastIndex = 0 (or cloning the regex)
immediately before calling probe.regex.test(acc) inside the readiness loop so
each poll starts at the beginning of the pattern; update the branch where
probe.regex.test(acc) is used (the readiness check that returns { ready: true,
detail: `log matched ${probe.regex}` }) to reset lastIndex first.
In `@src/utils/DashboardApp/types.ts`:
- Around line 9-10: The source comment in src/utils/DashboardApp/types.ts
contains a machine-specific absolute path
'/Users/Martin/.claude/plans/golden-wandering-pillow.md'; replace that hardcoded
path with a repo-relative or generic reference (e.g.,
docs/design/golden-wandering-pillow.md or "see design
notes/golden-wandering-pillow.md") or remove it entirely so the comment no
longer exposes local workstation details, updating the comment near the file
header in types.ts accordingly.
In `@src/utils/network.ts`:
- Around line 67-75: The code currently spawns lsof (lsofBinary) and reads
lsofProc.stdout which can throw if spawn fails or the binary is missing; update
the logic in the function that calls lsofProc/lsofBinary to wrap the Bun.spawn
call and subsequent reads (and similarly the ps spawn logic around lines 87-93)
in try/catch, detect spawn failures or non-zero exit/error streams, log a
debug-level message via the existing logger, and return null as a safe fallback
instead of letting the exception propagate; reference lsofBinary, lsofProc, and
the corresponding psProc/psBinary symbols when making the changes so both code
paths handle missing binaries and spawn errors gracefully.
In `@src/utils/process/spawnDashboard.ts`:
- Around line 75-77: The current loop that registers signal handlers for
signalsToForward using process.on(sig, () => handleSignal(sig)) later calls
process.removeAllListeners(sig) which removes unrelated handlers; instead,
capture and store the exact listener function for each signal (e.g., create a
Map<string, Listener> or keep an array of {sig, handler}) when you call
process.on in the signalsToForward loop, and then during cleanup call
process.removeListener(sig, handler) for each stored handler so only the
handlers you installed (from spawnDashboard / handleSignal) are removed.
In `@tools`:
- Around line 245-253: The cleanup currently calls
process.removeAllListeners(sig) which removes other modules' handlers; instead
register and retain the exact listener functions you add (the ones
returned/created by forward(sig))—e.g., store them in a map or array keyed by
signal when you call process.on(sig, forward(sig))—and in cleanup clear
orphanTimer then call process.removeListener(sig, savedListener) for each
signal; update references to signals, forward, and cleanup accordingly so only
this module's handlers are removed.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9986a828-eed6-41f6-8f40-d619c6b9de5e
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (27)
package.jsonsrc/Internal/commands/reas/index.tssrc/azure-devops/README.mdsrc/azure-devops/cli.utils.tssrc/azure-devops/index.tssrc/azure-devops/lib/ado-configure.tssrc/azure-devops/lib/az-cli.utils.tssrc/clarity/index.tssrc/claude/commands/history.tssrc/shops/commands/ui.tssrc/shops/lib/ui-launcher.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/detach.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/lifecycle.tssrc/utils/DashboardApp/menu.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/preferences.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/types.tssrc/utils/network.tssrc/utils/process/spawnDashboard.tssrc/utils/ui/vite.base.tssrc/youtube/commands/ui.tstools
💤 Files with no reviewable changes (1)
- src/shops/lib/ui-launcher.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test (ubuntu-latest, 4)
🧰 Additional context used
📓 Path-based instructions (8)
src/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.ts: Always import and useSafeJSONfrom@app/utils/jsoninstead of the globalJSONobject; useSafeJSON.parse()andSafeJSON.stringify()everywhere
Uselogger(from@app/logger) for diagnostics; write to day-stamped file always and to stderr only when log level permits; useout.result()as the only writer to stdout
Log enough context to triage issues from logs alone without re-running the tool; log key decision branches, external-resource access, mode/config resolution, and result counts
Prefererror: errovererror: err instanceof Error ? err.message : String(err)when the error field accepts unknown type
Files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Do not useas anytype assertions; use proper type narrowing, type guards, or explicit interfaces instead
When working with union types, use discriminant checks (e.g.entity.className === "User") instead of type assertions
Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()
For functions with 3+ parameters or optional parameters, use an object parameter instead of positional parameters
Do not use one-lineifstatements, even for early returns; always use block form with braces
Add an empty line beforeifstatements unless the preceding line is a variable declaration used by thatif
Add an empty line after closing}unless followed byelse,catch,finally, or another}
Always checkisInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode
Files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Never add a file-path comment as the first line of files (e.g.,// src/path/to/file.ts)
Do not add comments that restate what the code already says; avoid obvious comments like// Build initial contextbeforebuildContext()
Files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
src/utils/
📄 CodeRabbit inference engine (CLAUDE.md)
When creating a new tool, check if helper functions are general-purpose and usable by other tools; if so, place them in
src/utils/instead of inside the tool directory
Files:
src/utils/DashboardApp/preferences.tssrc/utils/DashboardApp/detach.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
src/**/commands/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Commands should be thin wrappers that parse arguments and delegate to business logic in
src/<tool>/lib/files; keep command files lean
Files:
src/shops/commands/ui.tssrc/claude/commands/history.tssrc/youtube/commands/ui.ts
src/**/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/index.ts: Tool entry points must use a TypeScript file with shebang that shows an interactive tool selector when run without arguments, and executes the specified tool viabun runwhen given arguments
Tool entry points must end withawait runTool(program, { tool })from@app/utils/cli, which owns-v/--readme/help registration and console-level resolution
Files:
src/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/index.tssrc/clarity/index.ts
src/*/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Tool directories must contain either
index.ts/index.tsxor standalone.ts/.tsxfiles; tool name is derived from directory name or filename without extension
Files:
src/azure-devops/index.tssrc/clarity/index.ts
src/**/ui/**
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/ui/**: Before writing or restyling web UI, read.claude/docs/design-system.mdto ensure compliance with shared theme tokens and component primitives; never use raw palette colors, always use theme tokens
Never override a<Card>component's surface styling; pick rich Button/Card variants on purpose and wrap routes in shared shell/auth-layout
Files:
src/utils/ui/vite.base.ts
🧠 Learnings (22)
📚 Learning: 2026-02-24T15:32:37.494Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/output.ts:109-113
Timestamp: 2026-02-24T15:32:37.494Z
Learning: In TypeScript files under src/, do not require a leading blank line before an if statement that is the first statement inside a function body (immediately after the function signature). The blank line rule should only apply to if statements that come after other statements within the function body. Apply this guideline consistently across TS files in src to reduce unnecessary vertical whitespace and keep concise function bodies.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-09T13:13:58.786Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 81
File: src/github/commands/get.ts:209-212
Timestamp: 2026-03-09T13:13:58.786Z
Learning: In the GenesisTools repo (genesiscz/GenesisTools), do not treat CI formatter warnings as enforceable formatting rules for TypeScript files under src/. Focus reviews on logical correctness and consistency with existing code patterns. For files under src (e.g., src/github/commands/get.ts), prioritize code structure, readability, naming, correctness, and adherence to project conventions over automated formatting warnings from CI tools.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:31.610Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/timely/utils/entry-processor.ts:0-0
Timestamp: 2026-03-12T01:26:31.610Z
Learning: In code paths where JSON is consumed, prefer strict RFC 8259 validation by using SafeJSON.parse(text, { strict: true }) instead of the lenient default. Apply this at non-config boundaries (e.g., API responses, JSONL, cache outputs, subprocess outputs). Reserve the lenient comment-json behavior only for user-authored config files that may legitimately contain comments or trailing commas. For src/timely/utils/entry-processor.ts and similar modules, replace or wrap JSON parsing with SafeJSON.parse(text, { strict: true }) unless you are explicitly handling config files that require comments.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:58:27.831Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 103
File: src/port/index.ts:137-144
Timestamp: 2026-03-12T01:58:27.831Z
Learning: In GenesisTools, apply a no-obvious-comments rule: do not add inline comments for well-known POSIX patterns or standard idioms (e.g., a process.kill(pid, 0) probe) when surrounding code is self-documenting through descriptive function/variable names. This guidance applies to TypeScript files under src (src/**/*.ts). Only include comments if they add non-obvious rationale, edge-case behavior, or explain complex logic that cannot be inferred from code alone.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:44.520Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/commands/graph.ts:34-34
Timestamp: 2026-03-22T22:19:44.520Z
Learning: In genesiscz/GenesisTools, when using `SafeJSON.parse` in `src/**/*.ts`, it is acceptable to omit `{ strict: true }` if (and only if) the JSON being parsed is internal cache/state written by the same codebase (e.g., data saved by one internal writer and later read from a corresponding cached file). Do not require strict mode for these internal, machine-generated cache files. Require `{ strict: true }` at external/untrusted boundaries instead (e.g., API responses, third-party JSONL, subprocess output, or any JSON whose contents may not have been produced by trusted internal code).
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-25T19:55:27.917Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/search/stores/vector-store.ts:19-23
Timestamp: 2026-03-25T19:55:27.917Z
Learning: When reviewing this codebase’s “3+ parameters → object parameter” guideline, only suggest object-parameter refactoring when the function’s parameters are ambiguous or include optional/unclear semantics. Do not flag tightly-defined utility/helper functions where (1) all parameters are required, (2) meanings are semantically clear from parameter names, and (3) the ordering is well-ordered and obvious. For example, functions like bruteForceVectorSearch(memoryIndex, queryVector, limit) should be allowed to keep positional parameters because the intent is clear.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T03:52:21.057Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/debugging-master/core/dashboard-server.ts:115-127
Timestamp: 2026-05-05T03:52:21.057Z
Learning: When reviewing Bun.serve fetch handlers in this repo, don’t treat `req.signal` as possibly `undefined` at runtime. Bun guarantees an `AbortSignal` on every incoming Request, so `req.signal?.addEventListener(...)` is unnecessary for runtime safety and is only a TypeScript narrowing artifact (e.g., the type might be `AbortSignal | null`). Therefore, don’t raise concerns about SSE/subscription cleanup being skipped because `req.signal` could be missing; cleanup decisions should be based on the actual handler lifecycle, not an imagined runtime absence of `req.signal`.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-24T15:32:44.925Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/review-output.ts:18-20
Timestamp: 2026-02-24T15:32:44.925Z
Learning: In TypeScript files, do not require a blank line between the opening brace of a function and the first statement if the first statement is the if statement immediately after the signature. The blank-line rule applies to separating an if from unrelated preceding code within the same block, not to spacing after the function opening brace. Apply this rule to all TS functions across the codebase.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:03.611Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/ask/lib/ChatSessionManager.ts:0-0
Timestamp: 2026-03-12T01:26:03.611Z
Learning: Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation in all non-config boundaries (API responses, JSONL, cache, subprocess output). The 3-arg form SafeJSON.parse(text, null, { strict: true }) is invalid and should not be used. Only lenient default (no options) is appropriate for user-authored config files that may contain comments/trailing commas. Apply this guideline across TypeScript files (src/**/*.ts) wherever SafeJSON.parse is used.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:18.985Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/claude/lib/history/search.ts:0-0
Timestamp: 2026-03-12T01:26:18.985Z
Learning: When using SafeJSON.parse in TypeScript code, prefer the two-argument form SafeJSON.parse(text, { strict: true }) to enable strict RFC 8259 validation via the native JSON.parse. Do NOT use the three-argument form SafeJSON.parse(text, null, { strict: true }). Apply strict parsing at remote/third-party API boundaries, JSONL parsing points, and subprocess output. Fall back to the lenient/default form only for user-authored config files that may legitimately contain comments or trailing commas. This pattern keeps strict validation where appropriate and preserves leniency for internal/config data.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:27.000Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/debugging-master/commands/tail.ts:0-0
Timestamp: 2026-03-12T01:26:27.000Z
Learning: In the genesiscz/GenesisTools repository, prefer using SafeJSON.parse(text, { strict: true }) (2-argument form) at all non-config JSON boundaries such as API responses, JSONL parsers, cache files, and subprocess stdout. Reserve the lenient default (SafeJSON.parse(text) with no options) only for user-authored config files that may legitimately contain comments or trailing commas.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:24.859Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/azure-devops/commands/history-sync.ts:0-0
Timestamp: 2026-03-12T01:26:24.859Z
Learning: In GenesisTools, ensure SafeJSON.parse is called with exactly two arguments. Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation, or pass a reviver function as the second argument. Do not call SafeJSON.parse(text, null, { strict: true }) since the function signature does not support a three-argument form. Apply this guideline to all TypeScript files that use SafeJSON.parse (e.g., src/utils/json.ts) and other related code.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-17T01:30:56.939Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 107
File: src/utils/macos/tts.ts:130-139
Timestamp: 2026-03-17T01:30:56.939Z
Learning: In genesiscz/GenesisTools, do not suggest converting two-argument functions with an optional second parameter (for example setMute(muted: boolean, app?: string)) to an object-parameter form. The project prefers simple positional parameters for short utility functions, even when an optional argument is present. The object-parameter guideline should only apply when a function has 3 or more parameters.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:49.876Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/index.ts:41-56
Timestamp: 2026-03-22T22:19:49.876Z
Learning: When using Bun projects, treat `import.meta.dir` as an absolute directory path provided by Bun. If you build paths by concatenating with `import.meta.dir` (e.g., `import.meta.dir + "/file.ts"`), do not require `path.resolve()` as it would be redundant. Only apply `path.resolve()` guidance when the base path is relative (not when the base is already an absolute `import.meta.dir`).
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T03:48:42.474Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 104
File: src/darwinkit/index.ts:146-156
Timestamp: 2026-03-12T03:48:42.474Z
Learning: In TypeScript files that use Commander subcommands and exit after showing help, replace code after Command.help() with the pattern: call sub.outputHelp(); (returns void) followed by process.exit(0) or process.exit(1). This avoids TS7027 unreachable-code because Command.help() returns never. Apply this pattern in all src/**/*.ts files where subcommands need to display help before exiting.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T11:58:33.420Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/indexer/lib/sources/mail-source.dateSent.probe.test.ts:0-0
Timestamp: 2026-05-05T11:58:33.420Z
Learning: This repo uses Biome 2.x. The console lint rule is `noConsole` (located at `lint/suspicious/noConsole`), not `noConsoleLog`. In this codebase, `noConsole` is disabled in `biome.json`, so adding a `// biome-ignore lint/suspicious/noConsole:<...>` suppression comment is a no-op and should be avoided (CI flags it as having no effect). When reviewing, do not suggest adding Biome suppression comments for console usage; if a `console.*` call must remain, leave it without a `biome-ignore` comment.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T14:02:30.445Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 171
File: src/utils/ui/layouts/AuthLayout.tsx:34-34
Timestamp: 2026-05-18T14:02:30.445Z
Learning: When reviewing a PR, before leaving any comment on a specific file and hunk, verify that the file (and the relevant lines) actually exist in the PR’s current diff. For example, use `git diff --name-only <base>...<head>` (or the PR’s file list) to confirm the file is part of the diff, since pre-rebase/stale hunk references can lead to incorrect or outdated comments.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T15:39:25.103Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 173
File: src/question/commands/log.ts:0-0
Timestamp: 2026-05-18T15:39:25.103Z
Learning: In genesiscz/GenesisTools, when implementing colored terminal/CLI output in TypeScript code under src/, use `picocolors` imported as `pc` (e.g., `import pc from 'picocolors'`). Do not propose `chalk` for CLI coloring. For chained styling (e.g., what chalk would express as `bold` + `blue`), compose picocolors calls by nesting, such as `pc.bold(pc.blue(text))`. Treat any mention of chalk in outdated docs (e.g., CLAUDE.md) as non-authoritative for this guideline.
Applied to files:
src/azure-devops/lib/ado-configure.tssrc/utils/DashboardApp/preferences.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/detach.tssrc/claude/commands/history.tssrc/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/pidFile.tssrc/azure-devops/lib/az-cli.utils.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/clarity/index.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/youtube/commands/ui.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/azure-devops/cli.utils.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-25T21:01:55.569Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:104-111
Timestamp: 2026-03-25T21:01:55.569Z
Learning: For GenesisTools utilities under src/utils/**, Windows path support is required. When reviewing files in src/utils, treat POSIX-only path handling as a CRITICAL issue—e.g., code that searches for only "/" as the path separator or ignores "\\". Ensure path utility functions correctly handle both separators ("/" and "\\"), for example by using regex patterns like /[\\/]/ when parsing or splitting paths.
Applied to files:
src/utils/DashboardApp/preferences.tssrc/utils/DashboardApp/detach.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-26T00:12:19.016Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:100-103
Timestamp: 2026-03-26T00:12:19.016Z
Learning: In this repo’s utility files (src/utils/**/*.ts), prefer minimal JSDoc for functions like truncatePath(path, maxLength). Do not add “obvious” implementation details (e.g., explicitly listing handled path separators such as / and \\) when the function/parameter names are self-documenting. Only expand JSDoc when there is non-obvious rationale, important design constraints, or edge-case behavior that would otherwise be unclear to reviewers.
Applied to files:
src/utils/DashboardApp/preferences.tssrc/utils/DashboardApp/detach.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/types.tssrc/utils/process/spawnDashboard.tssrc/utils/DashboardApp/launchd.tssrc/utils/network.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/menu.tssrc/utils/ui/vite.base.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-25T23:00:07.620Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 56
File: plugins/genesis-tools/commands/github-pr.md:131-131
Timestamp: 2026-02-25T23:00:07.620Z
Learning: Adopt the style: use lowercase 'markdown' (not 'Markdown') in the GenesisTools documentation. Apply this consistently across all Markdown files in the repository (any .md file), including generated docs and READMEs.
Applied to files:
src/azure-devops/README.md
📚 Learning: 2026-05-19T18:33:15.211Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 176
File: src/telegram/index.ts:25-28
Timestamp: 2026-05-19T18:33:15.211Z
Learning: When reviewing legacy CLI entrypoint files (e.g., src/**/index.ts) that call `await runTool(program, { tool: "..." })`, allow the `.catch()` handler to keep `console.error(err); process.exit(1)` without requiring a switch to `logger.error` **only** for minimal-touch migrations that were done solely to satisfy the “no-default-import” gate and that add no new feature/behavior code. If the PR introduces any new feature logic or expands the catch-handling beyond that migration, prefer `logger.error` (and follow the repo’s normal logging conventions).
Applied to files:
src/Internal/commands/reas/index.tssrc/azure-devops/index.tssrc/utils/DashboardApp/index.tssrc/clarity/index.ts
🪛 markdownlint-cli2 (0.22.1)
src/azure-devops/README.md
[warning] 141-141: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
[warning] 143-143: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🔇 Additional comments (13)
package.json (1)
61-61: LGTM!src/claude/commands/history.ts (1)
22-22: LGTM!Also applies to: 347-359
src/youtube/commands/ui.ts (1)
3-3: LGTM!Also applies to: 27-42
src/Internal/commands/reas/index.ts (1)
479-479: LGTM!Also applies to: 502-504
src/shops/commands/ui.ts (1)
1-50: LGTM!src/azure-devops/lib/az-cli.utils.ts (1)
1-67: LGTM!src/azure-devops/cli.utils.ts (1)
5-10: LGTM!Also applies to: 33-34, 39-39, 42-43, 51-51, 99-99, 101-103, 110-110, 112-115, 119-119, 143-143
src/azure-devops/index.ts (1)
17-17: LGTM!Also applies to: 122-123
src/azure-devops/lib/ado-configure.ts (1)
4-4: LGTM!src/azure-devops/README.md (1)
478-483: LGTM!src/utils/DashboardApp/portConflict.ts (1)
15-38: LGTM!src/utils/DashboardApp/pidFile.ts (1)
19-99: LGTM!src/utils/ui/vite.base.ts (1)
164-193: LGTM!Also applies to: 225-227
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/utils/DashboardApp/lifecycle.ts (1)
108-113: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winRedundant conditional: both branches are identical.
The
opts.interactivecheck is unnecessary—promptMineMenualready gates onisInteractive()internally and returnsnullfor non-TTY, whichhandleMineMenuhandles. Both branches execute the same call.♻️ Suggested simplification
if (conflict.state === "mine") { - if (opts.interactive) { - return handleMineMenu(ctx, conflict.pid, opts); - } return handleMineMenu(ctx, conflict.pid, opts); }🤖 Prompt for 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. In `@src/utils/DashboardApp/lifecycle.ts` around lines 108 - 113, The conditional checking opts.interactive around the conflict.state === "mine" branch is redundant because both branches call handleMineMenu(ctx, conflict.pid, opts) and promptMineMenu already handles interactivity; simplify by removing the opts.interactive check and directly call handleMineMenu when conflict.state === "mine" (update the block that references conflict.state === "mine" to a single unconditional call to handleMineMenu with the same arguments).src/Internal/commands/reas/index.ts (1)
71-84:⚠️ Potential issue | 🟠 Major | ⚡ Quick winGuard district selection prompt for non-interactive runs.
resolveDistrictFromAddresscan open a prompt when multiple matches exist, but this path is reachable from flag-based execution (buildFromFlags). In non-interactive contexts, this can block/fail command execution.Suggested fix
async function resolveDistrictFromAddress(address: string): Promise<DistrictInfo> { const results = await resolveAddress(address); if (results.length === 0) { throw new Error(`No district found for address "${address}". Try using --district instead.`); } if (results.length === 1) { return results[0].district; } + + if (!isInteractive()) { + throw new Error( + `Multiple districts found for "${address}". Re-run with --district to select one explicitly.` + ); + } const picked = await p.select({ message: `Multiple districts found for "${address}"`, options: results.map((r) => ({ value: r.district.name, label: `${r.district.name} (${r.municipalityName})`, })), });As per coding guidelines: "Always check
isInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode".🤖 Prompt for 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. In `@src/Internal/commands/reas/index.ts` around lines 71 - 84, The prompt flow in resolveDistrictFromAddress currently calls p.select (and p.isCancel) which will block in non-interactive runs (e.g., when invoked via buildFromFlags); update resolveDistrictFromAddress to call isInteractive() from `@app/utils/cli` before showing p.select: if interactive, keep the existing prompt logic (p.select, p.isCancel and getDistrict), otherwise do not prompt—either choose a sensible default (e.g., the first result and call getDistrict with results[0].district.name) or abort with suggestCommand() to instruct the user to re-run interactively; ensure the non-interactive branch does not call p.select or p.isCancel and returns/throws consistently for callers like buildFromFlags.
♻️ Duplicate comments (3)
src/utils/DashboardApp/lifecycle.ts (2)
498-504:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAvoid bare catch in process liveness probe.
catch {}hides error context and violates repo exception-handling rules.🛡️ Suggested fix
} catch (err) { + logger.debug({ err, pid }, "process liveness probe failed"); return false; }As per coding guidelines: "Never use bare
catch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()."🤖 Prompt for 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. In `@src/utils/DashboardApp/lifecycle.ts` around lines 498 - 504, The isProcessAlive(pid: number) function currently uses a bare catch which swallows errors; change the catch to capture the error (e.g., catch (err)) and log it with the project's logger (logger.debug or logger.warn) including context (pid and operation) before returning false; retain the process.kill(pid, 0) probe and the boolean return but ensure the logged message references isProcessAlive and the pid so debugging is possible.
452-454:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
--linesis not sanitized; invalid values can break log rendering.
requestedis used directly in numeric operations.NaN,0, or negative values will cause incorrect slicing orBuffer.allocfailures.🛡️ Suggested fix
- const requested = opts.lines ?? 200; + const requestedRaw = opts.lines ?? 200; + const requested = Number.isFinite(requestedRaw) && requestedRaw > 0 ? Math.floor(requestedRaw) : 200;🤖 Prompt for 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. In `@src/utils/DashboardApp/lifecycle.ts` around lines 452 - 454, Sanitize opts.lines before using it: coerce opts.lines to an integer (e.g., parseInt or Math.trunc(Number(opts.lines))) and fall back to the default 200 if it is NaN, non-finite, <= 0, or otherwise invalid; then use that sanitized value instead of the raw requested in the readBytes calculation (update the declaration of requested and ensure subsequent code using requested — the readBytes = Math.min(size, Math.max(8_192, requested * 200)) line — uses the validated/clamped value, e.g., clamp requested to at least 1).src/utils/DashboardApp/menu.ts (1)
102-104:⚠️ Potential issue | 🟠 Major | ⚡ Quick winTreat prompt cancellation as abort, not
"skip".When the user presses Ctrl+C/Esc, returning
"skip"causeslifecycle.tsto silently continue startup without the required dependency, potentially resulting in a broken launch. An explicit cancel should halt the operation.🐛 Suggested fix
Update the type and return value:
-export type DependencyMenuChoice = "start" | "skip"; +export type DependencyMenuChoice = "start" | "skip" | "abort";if (p.isCancel(picked)) { - return "skip"; + return "abort"; }Then handle
"abort"inlifecycle.ts(around line 94-101) to stop the startup flow:const choice = await promptDependencyStart(dep.app.config.key, config.key); if (choice === "start") { await dep.app.up({ open: false }); + } else if (choice === "abort") { + return { started: false, port, mode: opts.foreground ? "foreground" : "background" }; } else if (choice === null) {🤖 Prompt for 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. In `@src/utils/DashboardApp/menu.ts` around lines 102 - 104, The prompt cancellation branch in menu.ts currently treats p.isCancel(picked) as a "skip" which lets lifecycle continue; change it to return an explicit "abort" value and update any related union/type (e.g., the PickResult/return type used by the function that produces picked) so callers can distinguish abort from skip; then update lifecycle.ts to handle the new "abort" case (instead of treating it as skip) and immediately halt the startup flow (stop further initialization and surface the abort to the caller/user).
🤖 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.
Outside diff comments:
In `@src/Internal/commands/reas/index.ts`:
- Around line 71-84: The prompt flow in resolveDistrictFromAddress currently
calls p.select (and p.isCancel) which will block in non-interactive runs (e.g.,
when invoked via buildFromFlags); update resolveDistrictFromAddress to call
isInteractive() from `@app/utils/cli` before showing p.select: if interactive,
keep the existing prompt logic (p.select, p.isCancel and getDistrict), otherwise
do not prompt—either choose a sensible default (e.g., the first result and call
getDistrict with results[0].district.name) or abort with suggestCommand() to
instruct the user to re-run interactively; ensure the non-interactive branch
does not call p.select or p.isCancel and returns/throws consistently for callers
like buildFromFlags.
In `@src/utils/DashboardApp/lifecycle.ts`:
- Around line 108-113: The conditional checking opts.interactive around the
conflict.state === "mine" branch is redundant because both branches call
handleMineMenu(ctx, conflict.pid, opts) and promptMineMenu already handles
interactivity; simplify by removing the opts.interactive check and directly call
handleMineMenu when conflict.state === "mine" (update the block that references
conflict.state === "mine" to a single unconditional call to handleMineMenu with
the same arguments).
---
Duplicate comments:
In `@src/utils/DashboardApp/lifecycle.ts`:
- Around line 498-504: The isProcessAlive(pid: number) function currently uses a
bare catch which swallows errors; change the catch to capture the error (e.g.,
catch (err)) and log it with the project's logger (logger.debug or logger.warn)
including context (pid and operation) before returning false; retain the
process.kill(pid, 0) probe and the boolean return but ensure the logged message
references isProcessAlive and the pid so debugging is possible.
- Around line 452-454: Sanitize opts.lines before using it: coerce opts.lines to
an integer (e.g., parseInt or Math.trunc(Number(opts.lines))) and fall back to
the default 200 if it is NaN, non-finite, <= 0, or otherwise invalid; then use
that sanitized value instead of the raw requested in the readBytes calculation
(update the declaration of requested and ensure subsequent code using requested
— the readBytes = Math.min(size, Math.max(8_192, requested * 200)) line — uses
the validated/clamped value, e.g., clamp requested to at least 1).
In `@src/utils/DashboardApp/menu.ts`:
- Around line 102-104: The prompt cancellation branch in menu.ts currently
treats p.isCancel(picked) as a "skip" which lets lifecycle continue; change it
to return an explicit "abort" value and update any related union/type (e.g., the
PickResult/return type used by the function that produces picked) so callers can
distinguish abort from skip; then update lifecycle.ts to handle the new "abort"
case (instead of treating it as skip) and immediately halt the startup flow
(stop further initialization and surface the abort to the caller/user).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ffee0af6-c60e-4634-8d54-aae5b344cecb
📒 Files selected for processing (4)
src/Internal/commands/reas/index.tssrc/clarity/index.tssrc/utils/DashboardApp/lifecycle.tssrc/utils/DashboardApp/menu.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test (ubuntu-latest, 4)
🧰 Additional context used
📓 Path-based instructions (6)
src/**/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/index.ts: Tool entry points must use a TypeScript file with shebang that shows an interactive tool selector when run without arguments, and executes the specified tool viabun runwhen given arguments
Tool entry points must end withawait runTool(program, { tool })from@app/utils/cli, which owns-v/--readme/help registration and console-level resolution
Files:
src/clarity/index.tssrc/Internal/commands/reas/index.ts
src/*/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Tool directories must contain either
index.ts/index.tsxor standalone.ts/.tsxfiles; tool name is derived from directory name or filename without extension
Files:
src/clarity/index.ts
src/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.ts: Always import and useSafeJSONfrom@app/utils/jsoninstead of the globalJSONobject; useSafeJSON.parse()andSafeJSON.stringify()everywhere
Uselogger(from@app/logger) for diagnostics; write to day-stamped file always and to stderr only when log level permits; useout.result()as the only writer to stdout
Log enough context to triage issues from logs alone without re-running the tool; log key decision branches, external-resource access, mode/config resolution, and result counts
Prefererror: errovererror: err instanceof Error ? err.message : String(err)when the error field accepts unknown type
Files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Do not useas anytype assertions; use proper type narrowing, type guards, or explicit interfaces instead
When working with union types, use discriminant checks (e.g.entity.className === "User") instead of type assertions
Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()
For functions with 3+ parameters or optional parameters, use an object parameter instead of positional parameters
Do not use one-lineifstatements, even for early returns; always use block form with braces
Add an empty line beforeifstatements unless the preceding line is a variable declaration used by thatif
Add an empty line after closing}unless followed byelse,catch,finally, or another}
Always checkisInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode
Files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Never add a file-path comment as the first line of files (e.g.,// src/path/to/file.ts)
Do not add comments that restate what the code already says; avoid obvious comments like// Build initial contextbeforebuildContext()
Files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
src/utils/
📄 CodeRabbit inference engine (CLAUDE.md)
When creating a new tool, check if helper functions are general-purpose and usable by other tools; if so, place them in
src/utils/instead of inside the tool directory
Files:
src/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
🧠 Learnings (21)
📚 Learning: 2026-02-24T15:32:37.494Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/output.ts:109-113
Timestamp: 2026-02-24T15:32:37.494Z
Learning: In TypeScript files under src/, do not require a leading blank line before an if statement that is the first statement inside a function body (immediately after the function signature). The blank line rule should only apply to if statements that come after other statements within the function body. Apply this guideline consistently across TS files in src to reduce unnecessary vertical whitespace and keep concise function bodies.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-09T13:13:58.786Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 81
File: src/github/commands/get.ts:209-212
Timestamp: 2026-03-09T13:13:58.786Z
Learning: In the GenesisTools repo (genesiscz/GenesisTools), do not treat CI formatter warnings as enforceable formatting rules for TypeScript files under src/. Focus reviews on logical correctness and consistency with existing code patterns. For files under src (e.g., src/github/commands/get.ts), prioritize code structure, readability, naming, correctness, and adherence to project conventions over automated formatting warnings from CI tools.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:31.610Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/timely/utils/entry-processor.ts:0-0
Timestamp: 2026-03-12T01:26:31.610Z
Learning: In code paths where JSON is consumed, prefer strict RFC 8259 validation by using SafeJSON.parse(text, { strict: true }) instead of the lenient default. Apply this at non-config boundaries (e.g., API responses, JSONL, cache outputs, subprocess outputs). Reserve the lenient comment-json behavior only for user-authored config files that may legitimately contain comments or trailing commas. For src/timely/utils/entry-processor.ts and similar modules, replace or wrap JSON parsing with SafeJSON.parse(text, { strict: true }) unless you are explicitly handling config files that require comments.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:58:27.831Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 103
File: src/port/index.ts:137-144
Timestamp: 2026-03-12T01:58:27.831Z
Learning: In GenesisTools, apply a no-obvious-comments rule: do not add inline comments for well-known POSIX patterns or standard idioms (e.g., a process.kill(pid, 0) probe) when surrounding code is self-documenting through descriptive function/variable names. This guidance applies to TypeScript files under src (src/**/*.ts). Only include comments if they add non-obvious rationale, edge-case behavior, or explain complex logic that cannot be inferred from code alone.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:44.520Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/commands/graph.ts:34-34
Timestamp: 2026-03-22T22:19:44.520Z
Learning: In genesiscz/GenesisTools, when using `SafeJSON.parse` in `src/**/*.ts`, it is acceptable to omit `{ strict: true }` if (and only if) the JSON being parsed is internal cache/state written by the same codebase (e.g., data saved by one internal writer and later read from a corresponding cached file). Do not require strict mode for these internal, machine-generated cache files. Require `{ strict: true }` at external/untrusted boundaries instead (e.g., API responses, third-party JSONL, subprocess output, or any JSON whose contents may not have been produced by trusted internal code).
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-25T19:55:27.917Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/search/stores/vector-store.ts:19-23
Timestamp: 2026-03-25T19:55:27.917Z
Learning: When reviewing this codebase’s “3+ parameters → object parameter” guideline, only suggest object-parameter refactoring when the function’s parameters are ambiguous or include optional/unclear semantics. Do not flag tightly-defined utility/helper functions where (1) all parameters are required, (2) meanings are semantically clear from parameter names, and (3) the ordering is well-ordered and obvious. For example, functions like bruteForceVectorSearch(memoryIndex, queryVector, limit) should be allowed to keep positional parameters because the intent is clear.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T03:52:21.057Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/debugging-master/core/dashboard-server.ts:115-127
Timestamp: 2026-05-05T03:52:21.057Z
Learning: When reviewing Bun.serve fetch handlers in this repo, don’t treat `req.signal` as possibly `undefined` at runtime. Bun guarantees an `AbortSignal` on every incoming Request, so `req.signal?.addEventListener(...)` is unnecessary for runtime safety and is only a TypeScript narrowing artifact (e.g., the type might be `AbortSignal | null`). Therefore, don’t raise concerns about SSE/subscription cleanup being skipped because `req.signal` could be missing; cleanup decisions should be based on the actual handler lifecycle, not an imagined runtime absence of `req.signal`.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-24T15:32:44.925Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/review-output.ts:18-20
Timestamp: 2026-02-24T15:32:44.925Z
Learning: In TypeScript files, do not require a blank line between the opening brace of a function and the first statement if the first statement is the if statement immediately after the signature. The blank-line rule applies to separating an if from unrelated preceding code within the same block, not to spacing after the function opening brace. Apply this rule to all TS functions across the codebase.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:03.611Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/ask/lib/ChatSessionManager.ts:0-0
Timestamp: 2026-03-12T01:26:03.611Z
Learning: Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation in all non-config boundaries (API responses, JSONL, cache, subprocess output). The 3-arg form SafeJSON.parse(text, null, { strict: true }) is invalid and should not be used. Only lenient default (no options) is appropriate for user-authored config files that may contain comments/trailing commas. Apply this guideline across TypeScript files (src/**/*.ts) wherever SafeJSON.parse is used.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:18.985Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/claude/lib/history/search.ts:0-0
Timestamp: 2026-03-12T01:26:18.985Z
Learning: When using SafeJSON.parse in TypeScript code, prefer the two-argument form SafeJSON.parse(text, { strict: true }) to enable strict RFC 8259 validation via the native JSON.parse. Do NOT use the three-argument form SafeJSON.parse(text, null, { strict: true }). Apply strict parsing at remote/third-party API boundaries, JSONL parsing points, and subprocess output. Fall back to the lenient/default form only for user-authored config files that may legitimately contain comments or trailing commas. This pattern keeps strict validation where appropriate and preserves leniency for internal/config data.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:27.000Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/debugging-master/commands/tail.ts:0-0
Timestamp: 2026-03-12T01:26:27.000Z
Learning: In the genesiscz/GenesisTools repository, prefer using SafeJSON.parse(text, { strict: true }) (2-argument form) at all non-config JSON boundaries such as API responses, JSONL parsers, cache files, and subprocess stdout. Reserve the lenient default (SafeJSON.parse(text) with no options) only for user-authored config files that may legitimately contain comments or trailing commas.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:24.859Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/azure-devops/commands/history-sync.ts:0-0
Timestamp: 2026-03-12T01:26:24.859Z
Learning: In GenesisTools, ensure SafeJSON.parse is called with exactly two arguments. Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation, or pass a reviver function as the second argument. Do not call SafeJSON.parse(text, null, { strict: true }) since the function signature does not support a three-argument form. Apply this guideline to all TypeScript files that use SafeJSON.parse (e.g., src/utils/json.ts) and other related code.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-17T01:30:56.939Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 107
File: src/utils/macos/tts.ts:130-139
Timestamp: 2026-03-17T01:30:56.939Z
Learning: In genesiscz/GenesisTools, do not suggest converting two-argument functions with an optional second parameter (for example setMute(muted: boolean, app?: string)) to an object-parameter form. The project prefers simple positional parameters for short utility functions, even when an optional argument is present. The object-parameter guideline should only apply when a function has 3 or more parameters.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:49.876Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/index.ts:41-56
Timestamp: 2026-03-22T22:19:49.876Z
Learning: When using Bun projects, treat `import.meta.dir` as an absolute directory path provided by Bun. If you build paths by concatenating with `import.meta.dir` (e.g., `import.meta.dir + "/file.ts"`), do not require `path.resolve()` as it would be redundant. Only apply `path.resolve()` guidance when the base path is relative (not when the base is already an absolute `import.meta.dir`).
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T03:48:42.474Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 104
File: src/darwinkit/index.ts:146-156
Timestamp: 2026-03-12T03:48:42.474Z
Learning: In TypeScript files that use Commander subcommands and exit after showing help, replace code after Command.help() with the pattern: call sub.outputHelp(); (returns void) followed by process.exit(0) or process.exit(1). This avoids TS7027 unreachable-code because Command.help() returns never. Apply this pattern in all src/**/*.ts files where subcommands need to display help before exiting.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T11:58:33.420Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/indexer/lib/sources/mail-source.dateSent.probe.test.ts:0-0
Timestamp: 2026-05-05T11:58:33.420Z
Learning: This repo uses Biome 2.x. The console lint rule is `noConsole` (located at `lint/suspicious/noConsole`), not `noConsoleLog`. In this codebase, `noConsole` is disabled in `biome.json`, so adding a `// biome-ignore lint/suspicious/noConsole:<...>` suppression comment is a no-op and should be avoided (CI flags it as having no effect). When reviewing, do not suggest adding Biome suppression comments for console usage; if a `console.*` call must remain, leave it without a `biome-ignore` comment.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T14:02:30.445Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 171
File: src/utils/ui/layouts/AuthLayout.tsx:34-34
Timestamp: 2026-05-18T14:02:30.445Z
Learning: When reviewing a PR, before leaving any comment on a specific file and hunk, verify that the file (and the relevant lines) actually exist in the PR’s current diff. For example, use `git diff --name-only <base>...<head>` (or the PR’s file list) to confirm the file is part of the diff, since pre-rebase/stale hunk references can lead to incorrect or outdated comments.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T15:39:25.103Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 173
File: src/question/commands/log.ts:0-0
Timestamp: 2026-05-18T15:39:25.103Z
Learning: In genesiscz/GenesisTools, when implementing colored terminal/CLI output in TypeScript code under src/, use `picocolors` imported as `pc` (e.g., `import pc from 'picocolors'`). Do not propose `chalk` for CLI coloring. For chained styling (e.g., what chalk would express as `bold` + `blue`), compose picocolors calls by nesting, such as `pc.bold(pc.blue(text))`. Treat any mention of chalk in outdated docs (e.g., CLAUDE.md) as non-authoritative for this guideline.
Applied to files:
src/clarity/index.tssrc/utils/DashboardApp/menu.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-19T18:33:15.211Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 176
File: src/telegram/index.ts:25-28
Timestamp: 2026-05-19T18:33:15.211Z
Learning: When reviewing legacy CLI entrypoint files (e.g., src/**/index.ts) that call `await runTool(program, { tool: "..." })`, allow the `.catch()` handler to keep `console.error(err); process.exit(1)` without requiring a switch to `logger.error` **only** for minimal-touch migrations that were done solely to satisfy the “no-default-import” gate and that add no new feature/behavior code. If the PR introduces any new feature logic or expands the catch-handling beyond that migration, prefer `logger.error` (and follow the repo’s normal logging conventions).
Applied to files:
src/clarity/index.tssrc/Internal/commands/reas/index.ts
📚 Learning: 2026-03-25T21:01:55.569Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:104-111
Timestamp: 2026-03-25T21:01:55.569Z
Learning: For GenesisTools utilities under src/utils/**, Windows path support is required. When reviewing files in src/utils, treat POSIX-only path handling as a CRITICAL issue—e.g., code that searches for only "/" as the path separator or ignores "\\". Ensure path utility functions correctly handle both separators ("/" and "\\"), for example by using regex patterns like /[\\/]/ when parsing or splitting paths.
Applied to files:
src/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-26T00:12:19.016Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:100-103
Timestamp: 2026-03-26T00:12:19.016Z
Learning: In this repo’s utility files (src/utils/**/*.ts), prefer minimal JSDoc for functions like truncatePath(path, maxLength). Do not add “obvious” implementation details (e.g., explicitly listing handled path separators such as / and \\) when the function/parameter names are self-documenting. Only expand JSDoc when there is non-obvious rationale, important design constraints, or edge-case behavior that would otherwise be unclear to reviewers.
Applied to files:
src/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
🔇 Additional comments (7)
src/clarity/index.ts (4)
24-37: Scope Vite checks touicommand only.These guards execute at module load time, causing all
claritysubcommands (configure,fill,timesheet,--help) to fail when Vite dependencies are missing. Move the checks into thepreflighthook so onlyclarity uirequires Vite.
4-4: LGTM!
39-58: LGTM!
62-62: LGTM!src/utils/DashboardApp/lifecycle.ts (1)
1-9: LGTM!Also applies to: 40-56, 58-73, 75-103, 104-107, 114-150, 152-175, 177-227, 264-316, 318-321, 323-396, 398-443, 470-496, 507-519
src/utils/DashboardApp/menu.ts (1)
1-11: LGTM!Also applies to: 12-35, 37-68, 70-85, 109-120
src/Internal/commands/reas/index.ts (1)
29-29: LGTM!Also applies to: 146-146, 173-173, 188-188, 294-296, 301-301, 311-311
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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 `@src/dashboard/apps/web/vite.config.ts`:
- Around line 62-63: The alias replacement paths in vite.config.ts use new
URL(...).pathname which yields invalid Windows paths; update the replacement
values for the entries with find "`@app/logger/client`" and "`@app/utils/json`" (and
the other alias entries around the same block) to use fileURLToPath(new URL(...,
import.meta.url)) instead of .pathname so the aliases resolve correctly on
Windows and percent-encoded characters are unescaped; locate the replacement
objects in the array in the vite config and replace the .pathname usage with
fileURLToPath wrapping the new URL calls.
In `@src/dashboard/index.ts`:
- Around line 102-103: The current spawn("bunx", ["pm2", "start",
"ecosystem.config.cjs"], { cwd: DASHBOARD_DIR, stdio: "inherit" }) is
fired-and-forgotten, so the readiness polling can run even if PM2 fails; change
that to wait for the child process to finish (use a Promise around the child
process or spawnSync) and inspect its exit code and any stderr output, and if it
exits non-zero, log the error (include process output) and throw/return early
instead of proceeding to the readiness wait; update the code paths around
logger.info and the spawn call so that the subsequent readiness wait only runs
after a successful PM2 start.
In `@src/dev-dashboard/index.ts`:
- Around line 178-182: The readiness regex in the readiness object is too
permissive and matches the pre-start banner emitted by runUiServer(), causing a
false positive; narrow the pattern so it only matches actual Vite/ready
indicators (e.g., require the "Local:" prefix or the "ready in ...ms" token
instead of a bare "localhost:\d+"), by editing the readiness.regex value (inside
the readiness object) to remove or tighten the localhost:\d+ branch (for example
change localhost:\d+ to Local:\s*http:\/\/localhost:\d+ or drop it entirely) so
only real "Vite ready" lines are accepted and not the "Starting
dev-dashboard..." log.
In `@src/Internal/commands/reas/index.ts`:
- Around line 39-53: The reasUiApp dashboard definition (the defineDashboardApp
call that creates reasUiApp and uses reasUiConfigPath and PROJECT_ROOT) should
be moved out of the command module into a new lib module (e.g.,
src/Internal/commands/reas/lib or src/Internal/reas/lib) so the command file
only handles argument parsing and registration; extract the entire const
reasUiApp = defineDashboardApp({...}) block into that new module, export
reasUiApp (or a factory function) and then replace the block in index.ts with a
simple import and use of the exported symbol, keeping no spawn/readiness/launchd
logic in the command file.
In `@src/utils/ui/vite.base.ts`:
- Around line 205-208: The current slug generation (using relative(gitRoot,
root).split(sep).filter(Boolean).join("-") assigned to slug) can collide for
different paths; change the slug to be collision-proof by appending or replacing
it with a short hash of the relative path (e.g., compute a stable hash from the
relative path returned by relative(gitRoot, root) and append a few hex chars or
use the hash as the slug) so the final cache dir returned by join(gitRoot,
"node_modules", ".vite-cache", slug) is unique per actual path; update the code
around gitRoot, slug and the return expression to incorporate the hash while
keeping the human-readable part if desired.
In `@src/youtube/commands/ui.ts`:
- Around line 41-49: The --api-url option is only defined on
youtubeUiApp.commanderCommand and its preAction hook won't run for subcommands
like up; add the same option and preAction handling to the up (and restart if
relevant) subcommand(s) in src/utils/DashboardApp/commander.ts so that users can
call ui up --api-url <url>; specifically, replicate the cmd.option("--api-url
<url>", ...) declaration and the preAction hook logic (reading
thisCommand.opts(), calling getYoutube() and yt.config.update({ apiBaseUrl:
opts.apiUrl, firstRunComplete: true })) onto the Up subcommand (and Restart) or
alternatively attach a hook that runs for subcommands, ensuring the unique
symbols youtubeUiApp.commanderCommand, preAction, and
getYoutube/yt.config.update are used to locate where to apply the fix.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: f1349f04-1371-4256-9052-bb05d18297e6
📒 Files selected for processing (14)
src/Internal/commands/reas/index.tssrc/claude/commands/history.tssrc/dashboard/apps/web/tsconfig.jsonsrc/dashboard/apps/web/vite.config.tssrc/dashboard/index.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/youtube/commands/server.tssrc/youtube/commands/ui.tssrc/youtube/lib/server/app.tssrc/youtube/lib/server/cli/install.tssrc/youtube/lib/server/cli/start.tssrc/youtube/lib/server/cli/status.tssrc/youtube/lib/server/cli/stop.ts
💤 Files with no reviewable changes (4)
- src/youtube/lib/server/cli/start.ts
- src/youtube/lib/server/cli/stop.ts
- src/youtube/lib/server/cli/install.ts
- src/youtube/lib/server/cli/status.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
src/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.ts: Always import and useSafeJSONfrom@app/utils/jsoninstead of the globalJSONobject; useSafeJSON.parse()andSafeJSON.stringify()everywhere
Uselogger(from@app/logger) for diagnostics; write to day-stamped file always and to stderr only when log level permits; useout.result()as the only writer to stdout
Log enough context to triage issues from logs alone without re-running the tool; log key decision branches, external-resource access, mode/config resolution, and result counts
Prefererror: errovererror: err instanceof Error ? err.message : String(err)when the error field accepts unknown type
Files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Do not useas anytype assertions; use proper type narrowing, type guards, or explicit interfaces instead
When working with union types, use discriminant checks (e.g.entity.className === "User") instead of type assertions
Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()
For functions with 3+ parameters or optional parameters, use an object parameter instead of positional parameters
Do not use one-lineifstatements, even for early returns; always use block form with braces
Add an empty line beforeifstatements unless the preceding line is a variable declaration used by thatif
Add an empty line after closing}unless followed byelse,catch,finally, or another}
Always checkisInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode
Files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Never add a file-path comment as the first line of files (e.g.,// src/path/to/file.ts)
Do not add comments that restate what the code already says; avoid obvious comments like// Build initial contextbeforebuildContext()
Files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
src/**/commands/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Commands should be thin wrappers that parse arguments and delegate to business logic in
src/<tool>/lib/files; keep command files lean
Files:
src/youtube/commands/server.tssrc/claude/commands/history.tssrc/youtube/commands/ui.ts
src/**/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/index.ts: Tool entry points must use a TypeScript file with shebang that shows an interactive tool selector when run without arguments, and executes the specified tool viabun runwhen given arguments
Tool entry points must end withawait runTool(program, { tool })from@app/utils/cli, which owns-v/--readme/help registration and console-level resolution
Files:
src/dashboard/index.tssrc/dev-dashboard/index.tssrc/Internal/commands/reas/index.ts
src/*/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Tool directories must contain either
index.ts/index.tsxor standalone.ts/.tsxfiles; tool name is derived from directory name or filename without extension
Files:
src/dashboard/index.tssrc/dev-dashboard/index.ts
src/**/ui/**
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/ui/**: Before writing or restyling web UI, read.claude/docs/design-system.mdto ensure compliance with shared theme tokens and component primitives; never use raw palette colors, always use theme tokens
Never override a<Card>component's surface styling; pick rich Button/Card variants on purpose and wrap routes in shared shell/auth-layout
Files:
src/utils/ui/vite.base.ts
src/utils/
📄 CodeRabbit inference engine (CLAUDE.md)
When creating a new tool, check if helper functions are general-purpose and usable by other tools; if so, place them in
src/utils/instead of inside the tool directory
Files:
src/utils/ui/vite.base.ts
🧠 Learnings (21)
📚 Learning: 2026-02-24T15:32:37.494Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/output.ts:109-113
Timestamp: 2026-02-24T15:32:37.494Z
Learning: In TypeScript files under src/, do not require a leading blank line before an if statement that is the first statement inside a function body (immediately after the function signature). The blank line rule should only apply to if statements that come after other statements within the function body. Apply this guideline consistently across TS files in src to reduce unnecessary vertical whitespace and keep concise function bodies.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-09T13:13:58.786Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 81
File: src/github/commands/get.ts:209-212
Timestamp: 2026-03-09T13:13:58.786Z
Learning: In the GenesisTools repo (genesiscz/GenesisTools), do not treat CI formatter warnings as enforceable formatting rules for TypeScript files under src/. Focus reviews on logical correctness and consistency with existing code patterns. For files under src (e.g., src/github/commands/get.ts), prioritize code structure, readability, naming, correctness, and adherence to project conventions over automated formatting warnings from CI tools.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:26:31.610Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/timely/utils/entry-processor.ts:0-0
Timestamp: 2026-03-12T01:26:31.610Z
Learning: In code paths where JSON is consumed, prefer strict RFC 8259 validation by using SafeJSON.parse(text, { strict: true }) instead of the lenient default. Apply this at non-config boundaries (e.g., API responses, JSONL, cache outputs, subprocess outputs). Reserve the lenient comment-json behavior only for user-authored config files that may legitimately contain comments or trailing commas. For src/timely/utils/entry-processor.ts and similar modules, replace or wrap JSON parsing with SafeJSON.parse(text, { strict: true }) unless you are explicitly handling config files that require comments.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:58:27.831Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 103
File: src/port/index.ts:137-144
Timestamp: 2026-03-12T01:58:27.831Z
Learning: In GenesisTools, apply a no-obvious-comments rule: do not add inline comments for well-known POSIX patterns or standard idioms (e.g., a process.kill(pid, 0) probe) when surrounding code is self-documenting through descriptive function/variable names. This guidance applies to TypeScript files under src (src/**/*.ts). Only include comments if they add non-obvious rationale, edge-case behavior, or explain complex logic that cannot be inferred from code alone.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-22T22:19:44.520Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/commands/graph.ts:34-34
Timestamp: 2026-03-22T22:19:44.520Z
Learning: In genesiscz/GenesisTools, when using `SafeJSON.parse` in `src/**/*.ts`, it is acceptable to omit `{ strict: true }` if (and only if) the JSON being parsed is internal cache/state written by the same codebase (e.g., data saved by one internal writer and later read from a corresponding cached file). Do not require strict mode for these internal, machine-generated cache files. Require `{ strict: true }` at external/untrusted boundaries instead (e.g., API responses, third-party JSONL, subprocess output, or any JSON whose contents may not have been produced by trusted internal code).
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-25T19:55:27.917Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/search/stores/vector-store.ts:19-23
Timestamp: 2026-03-25T19:55:27.917Z
Learning: When reviewing this codebase’s “3+ parameters → object parameter” guideline, only suggest object-parameter refactoring when the function’s parameters are ambiguous or include optional/unclear semantics. Do not flag tightly-defined utility/helper functions where (1) all parameters are required, (2) meanings are semantically clear from parameter names, and (3) the ordering is well-ordered and obvious. For example, functions like bruteForceVectorSearch(memoryIndex, queryVector, limit) should be allowed to keep positional parameters because the intent is clear.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-05-05T03:52:21.057Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/debugging-master/core/dashboard-server.ts:115-127
Timestamp: 2026-05-05T03:52:21.057Z
Learning: When reviewing Bun.serve fetch handlers in this repo, don’t treat `req.signal` as possibly `undefined` at runtime. Bun guarantees an `AbortSignal` on every incoming Request, so `req.signal?.addEventListener(...)` is unnecessary for runtime safety and is only a TypeScript narrowing artifact (e.g., the type might be `AbortSignal | null`). Therefore, don’t raise concerns about SSE/subscription cleanup being skipped because `req.signal` could be missing; cleanup decisions should be based on the actual handler lifecycle, not an imagined runtime absence of `req.signal`.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-02-24T15:32:44.925Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/review-output.ts:18-20
Timestamp: 2026-02-24T15:32:44.925Z
Learning: In TypeScript files, do not require a blank line between the opening brace of a function and the first statement if the first statement is the if statement immediately after the signature. The blank-line rule applies to separating an if from unrelated preceding code within the same block, not to spacing after the function opening brace. Apply this rule to all TS functions across the codebase.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:26:03.611Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/ask/lib/ChatSessionManager.ts:0-0
Timestamp: 2026-03-12T01:26:03.611Z
Learning: Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation in all non-config boundaries (API responses, JSONL, cache, subprocess output). The 3-arg form SafeJSON.parse(text, null, { strict: true }) is invalid and should not be used. Only lenient default (no options) is appropriate for user-authored config files that may contain comments/trailing commas. Apply this guideline across TypeScript files (src/**/*.ts) wherever SafeJSON.parse is used.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:26:18.985Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/claude/lib/history/search.ts:0-0
Timestamp: 2026-03-12T01:26:18.985Z
Learning: When using SafeJSON.parse in TypeScript code, prefer the two-argument form SafeJSON.parse(text, { strict: true }) to enable strict RFC 8259 validation via the native JSON.parse. Do NOT use the three-argument form SafeJSON.parse(text, null, { strict: true }). Apply strict parsing at remote/third-party API boundaries, JSONL parsing points, and subprocess output. Fall back to the lenient/default form only for user-authored config files that may legitimately contain comments or trailing commas. This pattern keeps strict validation where appropriate and preserves leniency for internal/config data.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:26:27.000Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/debugging-master/commands/tail.ts:0-0
Timestamp: 2026-03-12T01:26:27.000Z
Learning: In the genesiscz/GenesisTools repository, prefer using SafeJSON.parse(text, { strict: true }) (2-argument form) at all non-config JSON boundaries such as API responses, JSONL parsers, cache files, and subprocess stdout. Reserve the lenient default (SafeJSON.parse(text) with no options) only for user-authored config files that may legitimately contain comments or trailing commas.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T01:26:24.859Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/azure-devops/commands/history-sync.ts:0-0
Timestamp: 2026-03-12T01:26:24.859Z
Learning: In GenesisTools, ensure SafeJSON.parse is called with exactly two arguments. Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation, or pass a reviver function as the second argument. Do not call SafeJSON.parse(text, null, { strict: true }) since the function signature does not support a three-argument form. Apply this guideline to all TypeScript files that use SafeJSON.parse (e.g., src/utils/json.ts) and other related code.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-17T01:30:56.939Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 107
File: src/utils/macos/tts.ts:130-139
Timestamp: 2026-03-17T01:30:56.939Z
Learning: In genesiscz/GenesisTools, do not suggest converting two-argument functions with an optional second parameter (for example setMute(muted: boolean, app?: string)) to an object-parameter form. The project prefers simple positional parameters for short utility functions, even when an optional argument is present. The object-parameter guideline should only apply when a function has 3 or more parameters.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-22T22:19:49.876Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/index.ts:41-56
Timestamp: 2026-03-22T22:19:49.876Z
Learning: When using Bun projects, treat `import.meta.dir` as an absolute directory path provided by Bun. If you build paths by concatenating with `import.meta.dir` (e.g., `import.meta.dir + "/file.ts"`), do not require `path.resolve()` as it would be redundant. Only apply `path.resolve()` guidance when the base path is relative (not when the base is already an absolute `import.meta.dir`).
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-03-12T03:48:42.474Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 104
File: src/darwinkit/index.ts:146-156
Timestamp: 2026-03-12T03:48:42.474Z
Learning: In TypeScript files that use Commander subcommands and exit after showing help, replace code after Command.help() with the pattern: call sub.outputHelp(); (returns void) followed by process.exit(0) or process.exit(1). This avoids TS7027 unreachable-code because Command.help() returns never. Apply this pattern in all src/**/*.ts files where subcommands need to display help before exiting.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-05-05T11:58:33.420Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/indexer/lib/sources/mail-source.dateSent.probe.test.ts:0-0
Timestamp: 2026-05-05T11:58:33.420Z
Learning: This repo uses Biome 2.x. The console lint rule is `noConsole` (located at `lint/suspicious/noConsole`), not `noConsoleLog`. In this codebase, `noConsole` is disabled in `biome.json`, so adding a `// biome-ignore lint/suspicious/noConsole:<...>` suppression comment is a no-op and should be avoided (CI flags it as having no effect). When reviewing, do not suggest adding Biome suppression comments for console usage; if a `console.*` call must remain, leave it without a `biome-ignore` comment.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-05-18T14:02:30.445Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 171
File: src/utils/ui/layouts/AuthLayout.tsx:34-34
Timestamp: 2026-05-18T14:02:30.445Z
Learning: When reviewing a PR, before leaving any comment on a specific file and hunk, verify that the file (and the relevant lines) actually exist in the PR’s current diff. For example, use `git diff --name-only <base>...<head>` (or the PR’s file list) to confirm the file is part of the diff, since pre-rebase/stale hunk references can lead to incorrect or outdated comments.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-05-18T15:39:25.103Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 173
File: src/question/commands/log.ts:0-0
Timestamp: 2026-05-18T15:39:25.103Z
Learning: In genesiscz/GenesisTools, when implementing colored terminal/CLI output in TypeScript code under src/, use `picocolors` imported as `pc` (e.g., `import pc from 'picocolors'`). Do not propose `chalk` for CLI coloring. For chained styling (e.g., what chalk would express as `bold` + `blue`), compose picocolors calls by nesting, such as `pc.bold(pc.blue(text))`. Treat any mention of chalk in outdated docs (e.g., CLAUDE.md) as non-authoritative for this guideline.
Applied to files:
src/dashboard/apps/web/vite.config.tssrc/youtube/commands/server.tssrc/youtube/lib/server/app.tssrc/dashboard/index.tssrc/claude/commands/history.tssrc/dev-dashboard/index.tssrc/utils/ui/vite.base.tssrc/Internal/commands/reas/index.tssrc/youtube/commands/ui.ts
📚 Learning: 2026-05-19T18:33:15.211Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 176
File: src/telegram/index.ts:25-28
Timestamp: 2026-05-19T18:33:15.211Z
Learning: When reviewing legacy CLI entrypoint files (e.g., src/**/index.ts) that call `await runTool(program, { tool: "..." })`, allow the `.catch()` handler to keep `console.error(err); process.exit(1)` without requiring a switch to `logger.error` **only** for minimal-touch migrations that were done solely to satisfy the “no-default-import” gate and that add no new feature/behavior code. If the PR introduces any new feature logic or expands the catch-handling beyond that migration, prefer `logger.error` (and follow the repo’s normal logging conventions).
Applied to files:
src/dashboard/index.tssrc/dev-dashboard/index.tssrc/Internal/commands/reas/index.ts
📚 Learning: 2026-03-25T21:01:55.569Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:104-111
Timestamp: 2026-03-25T21:01:55.569Z
Learning: For GenesisTools utilities under src/utils/**, Windows path support is required. When reviewing files in src/utils, treat POSIX-only path handling as a CRITICAL issue—e.g., code that searches for only "/" as the path separator or ignores "\\". Ensure path utility functions correctly handle both separators ("/" and "\\"), for example by using regex patterns like /[\\/]/ when parsing or splitting paths.
Applied to files:
src/utils/ui/vite.base.ts
📚 Learning: 2026-03-26T00:12:19.016Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:100-103
Timestamp: 2026-03-26T00:12:19.016Z
Learning: In this repo’s utility files (src/utils/**/*.ts), prefer minimal JSDoc for functions like truncatePath(path, maxLength). Do not add “obvious” implementation details (e.g., explicitly listing handled path separators such as / and \\) when the function/parameter names are self-documenting. Only expand JSDoc when there is non-obvious rationale, important design constraints, or edge-case behavior that would otherwise be unclear to reviewers.
Applied to files:
src/utils/ui/vite.base.ts
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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 `@src/dev-dashboard/e2e/qa.spec.ts`:
- Around line 41-44: Replace the shell-based execSync call with Node's
execFileSync and pass the command and arguments as an array (e.g. command
"tools" with args ["question","answer","--q", `Does Playwright see rendered
markdown for ${marker}?`, "--a-file", answerFile, "--tag", "question",
"--project", "GenesisTools"]) to avoid shell parsing; remove the hardcoded cwd
("/Users/...") and use a relative or environment-derived path such as
process.cwd() or a projectRoot variable so the test runs on CI and other
machines; preserve the stdio: "pipe" option and ensure marker and answerFile
variables are used directly (reference the existing execSync invocation, marker
and answerFile identifiers when making the change).
In `@src/dev-dashboard/ui/src/components/LiveSseIndicator.tsx`:
- Around line 10-17: The LiveSseIndicator component currently uses raw color
literals ("`#f87171`" and "bg-[`#f87171`]") in the inline style and className when
live is false; replace those with the dashboard theme token equivalents (use the
shared CSS variable or Tailwind token/class used across the dashboard) so the
color is not hard-coded. Update the inline style color and the falsy branch
className in LiveSseIndicator to reference the central token (e.g., replace
"`#f87171`" with the appropriate --dd-... CSS variable or "text-..."/ "bg-..."
dashboard utility class) and ensure the live truthy branch still uses the
existing emerald token; search the theme tokens used elsewhere in the UI to pick
the exact token name.
In `@src/dev-dashboard/ui/src/slate-grid.css`:
- Line 46: The box-shadow in slate-grid.css currently uses a hard-coded rgba
value; replace that rgba(52, 211, 153, 0.35) with a theme-driven token (e.g. a
CSS variable or the project's theme token) so the heading bar glow follows
theming. Update the box-shadow declaration in the selector containing box-shadow
to reference the token (for example use var(--<appropriate-token>-glow) or the
project's token helper) and ensure the token is defined in the global
theme/variables with the required alpha (or provide a fallback rgba value inside
the var()). Also update the theme token definition file where variables are
declared so the glow color is centrally configurable.
In `@src/utils/DashboardApp/logSession.ts`:
- Around line 57-111: printDevServerBanner currently writes directly to
process.stdout using process.stdout.write; replace those calls with the shared
stdout helper (e.g., out.println or out.result) for consistency with project I/O
conventions. Update the printDevServerBanner signature or import to access the
out writer, then change every process.stdout.write invocation inside
printDevServerBanner to out.println(...) (or out.result(...) if that better
matches surrounding usage) while preserving the exact string content and
newlines, and ensure the color handling and return behavior remain identical.
In `@src/utils/DashboardApp/portConflict.ts`:
- Around line 157-161: The bare catch blocks around process.kill(owner.pid,
"SIGTERM") (and the similar blocks at the other noted sites) swallow errors and
must instead log the caught exception; update the try/catch in portConflict.ts
where process.kill is used (referencing the owner variable and the surrounding
signal/liveness logic) to catch (err) and call the appropriate logger (e.g.,
logger.debug or logger.warn) with a clear message including owner.pid and the
error, preserving the existing comment about the process possibly being gone;
apply the same change to the other two occurrences so permission/state errors
are not silently discarded.
- Around line 46-48: The code currently labels any same-user listener as state
"stale" (return { state: "stale", owner }) which lets canKillPortOwner treat
same-user processes as killable when dashboardKey is set; instead, introduce a
distinct state for same-user listeners (e.g., return { state: "sameUser", owner
}) and update the other duplicate spot (the block at the other occurrence) to
match; then update canKillPortOwner to only allow termination when state ===
"stale" (not when state === "sameUser") or otherwise explicitly check for the
new "sameUser" state and deny kill unless additional strict criteria are met.
Ensure all references to the old implicit behavior are adjusted accordingly.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: bcbc3354-ffbf-46e8-92bb-5e825082bda8
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (34)
package.jsonsrc/Internal/commands/reas/index.tssrc/clarity/index.tssrc/claude/commands/history.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/dev-dashboard/index.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/src/slate-grid.csssrc/dev-dashboard/ui/src/styles.csssrc/dev-dashboard/ui/vite-middleware.tssrc/question/commands/record.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/lifecycle.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/menu.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/utils/ui/dashboards.tssrc/youtube/commands/ui.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test (ubuntu-latest, 4)
🧰 Additional context used
📓 Path-based instructions (9)
src/**/ui/**
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/ui/**: Before writing or restyling web UI, read.claude/docs/design-system.mdto ensure compliance with shared theme tokens and component primitives; never use raw palette colors, always use theme tokens
Never override a<Card>component's surface styling; pick rich Button/Card variants on purpose and wrap routes in shared shell/auth-layout
Files:
src/dev-dashboard/ui/src/styles.csssrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/dev-dashboard/ui/src/slate-grid.csssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/utils/ui/dashboards.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/ui/src/routes/qa.tsx
src/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.ts: Always import and useSafeJSONfrom@app/utils/jsoninstead of the globalJSONobject; useSafeJSON.parse()andSafeJSON.stringify()everywhere
Uselogger(from@app/logger) for diagnostics; write to day-stamped file always and to stderr only when log level permits; useout.result()as the only writer to stdout
Log enough context to triage issues from logs alone without re-running the tool; log key decision branches, external-resource access, mode/config resolution, and result counts
Prefererror: errovererror: err instanceof Error ? err.message : String(err)when the error field accepts unknown type
Files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Do not useas anytype assertions; use proper type narrowing, type guards, or explicit interfaces instead
When working with union types, use discriminant checks (e.g.entity.className === "User") instead of type assertions
Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()
For functions with 3+ parameters or optional parameters, use an object parameter instead of positional parameters
Do not use one-lineifstatements, even for early returns; always use block form with braces
Add an empty line beforeifstatements unless the preceding line is a variable declaration used by thatif
Add an empty line after closing}unless followed byelse,catch,finally, or another}
Always checkisInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode
Files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
src/**/commands/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Commands should be thin wrappers that parse arguments and delegate to business logic in
src/<tool>/lib/files; keep command files lean
Files:
src/question/commands/record.tssrc/claude/commands/history.tssrc/youtube/commands/ui.tssrc/shops/commands/ui.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Never add a file-path comment as the first line of files (e.g.,// src/path/to/file.ts)
Do not add comments that restate what the code already says; avoid obvious comments like// Build initial contextbeforebuildContext()
Files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
src/**/*.test.ts
📄 CodeRabbit inference engine (CLAUDE.md)
When adding database logic, use an in-memory
new Database(":memory:")for testing; group test files alongside source files
Files:
src/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/dev-dashboard/lib/qa-render.test.ts
src/utils/
📄 CodeRabbit inference engine (CLAUDE.md)
When creating a new tool, check if helper functions are general-purpose and usable by other tools; if so, place them in
src/utils/instead of inside the tool directory
Files:
src/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/utils/ui/dashboards.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
src/**/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/index.ts: Tool entry points must use a TypeScript file with shebang that shows an interactive tool selector when run without arguments, and executes the specified tool viabun runwhen given arguments
Tool entry points must end withawait runTool(program, { tool })from@app/utils/cli, which owns-v/--readme/help registration and console-level resolution
Files:
src/dev-dashboard/index.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/Internal/commands/reas/index.ts
src/*/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Tool directories must contain either
index.ts/index.tsxor standalone.ts/.tsxfiles; tool name is derived from directory name or filename without extension
Files:
src/dev-dashboard/index.tssrc/clarity/index.ts
🧠 Learnings (26)
📚 Learning: 2026-02-24T15:32:37.494Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/output.ts:109-113
Timestamp: 2026-02-24T15:32:37.494Z
Learning: In TypeScript files under src/, do not require a leading blank line before an if statement that is the first statement inside a function body (immediately after the function signature). The blank line rule should only apply to if statements that come after other statements within the function body. Apply this guideline consistently across TS files in src to reduce unnecessary vertical whitespace and keep concise function bodies.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-09T13:13:58.786Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 81
File: src/github/commands/get.ts:209-212
Timestamp: 2026-03-09T13:13:58.786Z
Learning: In the GenesisTools repo (genesiscz/GenesisTools), do not treat CI formatter warnings as enforceable formatting rules for TypeScript files under src/. Focus reviews on logical correctness and consistency with existing code patterns. For files under src (e.g., src/github/commands/get.ts), prioritize code structure, readability, naming, correctness, and adherence to project conventions over automated formatting warnings from CI tools.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:31.610Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/timely/utils/entry-processor.ts:0-0
Timestamp: 2026-03-12T01:26:31.610Z
Learning: In code paths where JSON is consumed, prefer strict RFC 8259 validation by using SafeJSON.parse(text, { strict: true }) instead of the lenient default. Apply this at non-config boundaries (e.g., API responses, JSONL, cache outputs, subprocess outputs). Reserve the lenient comment-json behavior only for user-authored config files that may legitimately contain comments or trailing commas. For src/timely/utils/entry-processor.ts and similar modules, replace or wrap JSON parsing with SafeJSON.parse(text, { strict: true }) unless you are explicitly handling config files that require comments.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:58:27.831Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 103
File: src/port/index.ts:137-144
Timestamp: 2026-03-12T01:58:27.831Z
Learning: In GenesisTools, apply a no-obvious-comments rule: do not add inline comments for well-known POSIX patterns or standard idioms (e.g., a process.kill(pid, 0) probe) when surrounding code is self-documenting through descriptive function/variable names. This guidance applies to TypeScript files under src (src/**/*.ts). Only include comments if they add non-obvious rationale, edge-case behavior, or explain complex logic that cannot be inferred from code alone.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:44.520Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/commands/graph.ts:34-34
Timestamp: 2026-03-22T22:19:44.520Z
Learning: In genesiscz/GenesisTools, when using `SafeJSON.parse` in `src/**/*.ts`, it is acceptable to omit `{ strict: true }` if (and only if) the JSON being parsed is internal cache/state written by the same codebase (e.g., data saved by one internal writer and later read from a corresponding cached file). Do not require strict mode for these internal, machine-generated cache files. Require `{ strict: true }` at external/untrusted boundaries instead (e.g., API responses, third-party JSONL, subprocess output, or any JSON whose contents may not have been produced by trusted internal code).
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-25T19:55:27.917Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/search/stores/vector-store.ts:19-23
Timestamp: 2026-03-25T19:55:27.917Z
Learning: When reviewing this codebase’s “3+ parameters → object parameter” guideline, only suggest object-parameter refactoring when the function’s parameters are ambiguous or include optional/unclear semantics. Do not flag tightly-defined utility/helper functions where (1) all parameters are required, (2) meanings are semantically clear from parameter names, and (3) the ordering is well-ordered and obvious. For example, functions like bruteForceVectorSearch(memoryIndex, queryVector, limit) should be allowed to keep positional parameters because the intent is clear.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T03:52:21.057Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/debugging-master/core/dashboard-server.ts:115-127
Timestamp: 2026-05-05T03:52:21.057Z
Learning: When reviewing Bun.serve fetch handlers in this repo, don’t treat `req.signal` as possibly `undefined` at runtime. Bun guarantees an `AbortSignal` on every incoming Request, so `req.signal?.addEventListener(...)` is unnecessary for runtime safety and is only a TypeScript narrowing artifact (e.g., the type might be `AbortSignal | null`). Therefore, don’t raise concerns about SSE/subscription cleanup being skipped because `req.signal` could be missing; cleanup decisions should be based on the actual handler lifecycle, not an imagined runtime absence of `req.signal`.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-24T15:32:44.925Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/review-output.ts:18-20
Timestamp: 2026-02-24T15:32:44.925Z
Learning: In TypeScript files, do not require a blank line between the opening brace of a function and the first statement if the first statement is the if statement immediately after the signature. The blank-line rule applies to separating an if from unrelated preceding code within the same block, not to spacing after the function opening brace. Apply this rule to all TS functions across the codebase.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:03.611Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/ask/lib/ChatSessionManager.ts:0-0
Timestamp: 2026-03-12T01:26:03.611Z
Learning: Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation in all non-config boundaries (API responses, JSONL, cache, subprocess output). The 3-arg form SafeJSON.parse(text, null, { strict: true }) is invalid and should not be used. Only lenient default (no options) is appropriate for user-authored config files that may contain comments/trailing commas. Apply this guideline across TypeScript files (src/**/*.ts) wherever SafeJSON.parse is used.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:18.985Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/claude/lib/history/search.ts:0-0
Timestamp: 2026-03-12T01:26:18.985Z
Learning: When using SafeJSON.parse in TypeScript code, prefer the two-argument form SafeJSON.parse(text, { strict: true }) to enable strict RFC 8259 validation via the native JSON.parse. Do NOT use the three-argument form SafeJSON.parse(text, null, { strict: true }). Apply strict parsing at remote/third-party API boundaries, JSONL parsing points, and subprocess output. Fall back to the lenient/default form only for user-authored config files that may legitimately contain comments or trailing commas. This pattern keeps strict validation where appropriate and preserves leniency for internal/config data.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:27.000Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/debugging-master/commands/tail.ts:0-0
Timestamp: 2026-03-12T01:26:27.000Z
Learning: In the genesiscz/GenesisTools repository, prefer using SafeJSON.parse(text, { strict: true }) (2-argument form) at all non-config JSON boundaries such as API responses, JSONL parsers, cache files, and subprocess stdout. Reserve the lenient default (SafeJSON.parse(text) with no options) only for user-authored config files that may legitimately contain comments or trailing commas.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:24.859Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/azure-devops/commands/history-sync.ts:0-0
Timestamp: 2026-03-12T01:26:24.859Z
Learning: In GenesisTools, ensure SafeJSON.parse is called with exactly two arguments. Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation, or pass a reviver function as the second argument. Do not call SafeJSON.parse(text, null, { strict: true }) since the function signature does not support a three-argument form. Apply this guideline to all TypeScript files that use SafeJSON.parse (e.g., src/utils/json.ts) and other related code.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-17T01:30:56.939Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 107
File: src/utils/macos/tts.ts:130-139
Timestamp: 2026-03-17T01:30:56.939Z
Learning: In genesiscz/GenesisTools, do not suggest converting two-argument functions with an optional second parameter (for example setMute(muted: boolean, app?: string)) to an object-parameter form. The project prefers simple positional parameters for short utility functions, even when an optional argument is present. The object-parameter guideline should only apply when a function has 3 or more parameters.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:49.876Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/index.ts:41-56
Timestamp: 2026-03-22T22:19:49.876Z
Learning: When using Bun projects, treat `import.meta.dir` as an absolute directory path provided by Bun. If you build paths by concatenating with `import.meta.dir` (e.g., `import.meta.dir + "/file.ts"`), do not require `path.resolve()` as it would be redundant. Only apply `path.resolve()` guidance when the base path is relative (not when the base is already an absolute `import.meta.dir`).
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T03:48:42.474Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 104
File: src/darwinkit/index.ts:146-156
Timestamp: 2026-03-12T03:48:42.474Z
Learning: In TypeScript files that use Commander subcommands and exit after showing help, replace code after Command.help() with the pattern: call sub.outputHelp(); (returns void) followed by process.exit(0) or process.exit(1). This avoids TS7027 unreachable-code because Command.help() returns never. Apply this pattern in all src/**/*.ts files where subcommands need to display help before exiting.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T11:58:33.420Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/indexer/lib/sources/mail-source.dateSent.probe.test.ts:0-0
Timestamp: 2026-05-05T11:58:33.420Z
Learning: This repo uses Biome 2.x. The console lint rule is `noConsole` (located at `lint/suspicious/noConsole`), not `noConsoleLog`. In this codebase, `noConsole` is disabled in `biome.json`, so adding a `// biome-ignore lint/suspicious/noConsole:<...>` suppression comment is a no-op and should be avoided (CI flags it as having no effect). When reviewing, do not suggest adding Biome suppression comments for console usage; if a `console.*` call must remain, leave it without a `biome-ignore` comment.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T14:02:30.445Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 171
File: src/utils/ui/layouts/AuthLayout.tsx:34-34
Timestamp: 2026-05-18T14:02:30.445Z
Learning: When reviewing a PR, before leaving any comment on a specific file and hunk, verify that the file (and the relevant lines) actually exist in the PR’s current diff. For example, use `git diff --name-only <base>...<head>` (or the PR’s file list) to confirm the file is part of the diff, since pre-rebase/stale hunk references can lead to incorrect or outdated comments.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T15:39:25.103Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 173
File: src/question/commands/log.ts:0-0
Timestamp: 2026-05-18T15:39:25.103Z
Learning: In genesiscz/GenesisTools, when implementing colored terminal/CLI output in TypeScript code under src/, use `picocolors` imported as `pc` (e.g., `import pc from 'picocolors'`). Do not propose `chalk` for CLI coloring. For chained styling (e.g., what chalk would express as `bold` + `blue`), compose picocolors calls by nesting, such as `pc.bold(pc.blue(text))`. Treat any mention of chalk in outdated docs (e.g., CLAUDE.md) as non-authoritative for this guideline.
Applied to files:
src/question/commands/record.tssrc/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/e2e/playwright.config.tssrc/dev-dashboard/e2e/qa.spec.tssrc/utils/ui/dashboards.tssrc/dev-dashboard/lib/front-proxy.tssrc/claude/commands/history.tssrc/utils/DashboardApp/commander.tssrc/dev-dashboard/lib/qa-render.test.tssrc/dev-dashboard/index.tssrc/dev-dashboard/ui/vite-middleware.tssrc/youtube/commands/ui.tssrc/utils/DashboardApp/pidFile.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/Internal/commands/reas/index.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/shops/commands/ui.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:53.048Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/utils/search/stores/qdrant-vector-store.test.ts:192-206
Timestamp: 2026-03-22T22:19:53.048Z
Learning: In src/**/*.test.ts, it is acceptable to include comments that explain the semantic role or conceptual grouping of numeric/vector test data clusters (e.g., “Cluster 1: 'code' vectors”, “Query close to 'docs' cluster”). Even if variable/identifier names partially suggest intent, these comments should be treated as readable context (describing how clusters/queries relate conceptually) rather than “obvious comments,” and should not be flagged by the no-obvious-comments rule when they genuinely clarify the test data grouping and relationships.
Applied to files:
src/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/dev-dashboard/lib/qa-render.test.ts
📚 Learning: 2026-03-25T21:01:55.569Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:104-111
Timestamp: 2026-03-25T21:01:55.569Z
Learning: For GenesisTools utilities under src/utils/**, Windows path support is required. When reviewing files in src/utils, treat POSIX-only path handling as a CRITICAL issue—e.g., code that searches for only "/" as the path separator or ignores "\\". Ensure path utility functions correctly handle both separators ("/" and "\\"), for example by using regex patterns like /[\\/]/ when parsing or splitting paths.
Applied to files:
src/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/utils/ui/dashboards.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-26T00:12:19.016Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:100-103
Timestamp: 2026-03-26T00:12:19.016Z
Learning: In this repo’s utility files (src/utils/**/*.ts), prefer minimal JSDoc for functions like truncatePath(path, maxLength). Do not add “obvious” implementation details (e.g., explicitly listing handled path separators such as / and \\) when the function/parameter names are self-documenting. Only expand JSDoc when there is non-obvious rationale, important design constraints, or edge-case behavior that would otherwise be unclear to reviewers.
Applied to files:
src/utils/DashboardApp/portConflict.test.tssrc/utils/DashboardApp/readiness.test.tssrc/utils/DashboardApp/viteSpawn.test.tssrc/utils/DashboardApp/viteSpawn.tssrc/utils/ui/dashboards.tssrc/utils/DashboardApp/commander.tssrc/utils/DashboardApp/pidFile.tssrc/utils/DashboardApp/index.tssrc/utils/DashboardApp/logSession.tssrc/utils/DashboardApp/portConflict.tssrc/utils/DashboardApp/types.tssrc/utils/DashboardApp/launchd.tssrc/utils/DashboardApp/readiness.tssrc/utils/DashboardApp/menu.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T09:50:40.172Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 170
File: src/utils/ui/layouts/DashboardLayout.tsx:1-2
Timestamp: 2026-05-18T09:50:40.172Z
Learning: In the genesiscz/GenesisTools repo, UI visual correctness is verified via Playwright before/after sweeps plus canary screenshots (see CLAUDE.md “No Tests” and evidence under .claude/docs/assets/). During code reviews of TSX UI code, do NOT suggest adding snapshot tests, Storybook/story tests, or introducing any UI test framework. If visual correctness is in question, ask whether the relevant Playwright sweep/canary screenshot evidence has been captured and linked in .claude/docs/assets/ instead of proposing new UI test infrastructure.
Applied to files:
src/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/ui/src/routes/qa.tsx
📚 Learning: 2026-05-18T09:50:40.172Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 170
File: src/utils/ui/layouts/DashboardLayout.tsx:1-2
Timestamp: 2026-05-18T09:50:40.172Z
Learning: For this repository (genesiscz/GenesisTools), UI verification is intentionally done via Playwright: before/after sweep screenshot sweeps and canary runs, with evidence stored under .claude/docs/assets/ (e.g., ui-drift-*/ containing sweep/after PNGs). During code reviews of TSX/UI changes, do NOT recommend adding snapshot tests, story tests, or any new UI test framework. If visual correctness is questioned, first ask whether the relevant Playwright sweep/canary evidence has been captured (per the repo’s documented “No Tests” policy in CLAUDE.md) rather than requesting new test infrastructure.
Applied to files:
src/dev-dashboard/ui/src/components/QaSectionHeading.tsxsrc/dev-dashboard/ui/src/components/LiveSseIndicator.tsxsrc/dev-dashboard/ui/src/routes/qa.tsx
📚 Learning: 2026-05-17T14:59:03.963Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 167
File: src/dev-dashboard/lib/ttyd/manager.ts:1-1
Timestamp: 2026-05-17T14:59:03.963Z
Learning: When spawning long-lived daemon child processes in this repo with Bun.spawn (e.g., dashboard subprocess managers), always use Bun’s object form: `Bun.spawn({ cmd, detached: true, ... })` and then call `.unref()` on the returned process. Use `detached: true` (requires Bun >= 0.6.0; it creates a new process group / uses setsid) so the child does not receive SIGHUP when the dashboard parent exits; also call `.unref()` so the parent can exit without waiting on the child. Do not omit `detached: true` for daemon-like subprocesses, since it can cause the child to die with the parent and lead to proxy failures (e.g., 502s) on routes depending on that process.
Applied to files:
src/dev-dashboard/lib/qa-render.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/lib/qa-render.test.ts
📚 Learning: 2026-05-19T18:33:15.211Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 176
File: src/telegram/index.ts:25-28
Timestamp: 2026-05-19T18:33:15.211Z
Learning: When reviewing legacy CLI entrypoint files (e.g., src/**/index.ts) that call `await runTool(program, { tool: "..." })`, allow the `.catch()` handler to keep `console.error(err); process.exit(1)` without requiring a switch to `logger.error` **only** for minimal-touch migrations that were done solely to satisfy the “no-default-import” gate and that add no new feature/behavior code. If the PR introduces any new feature logic or expands the catch-handling beyond that migration, prefer `logger.error` (and follow the repo’s normal logging conventions).
Applied to files:
src/dev-dashboard/index.tssrc/clarity/index.tssrc/utils/DashboardApp/index.tssrc/Internal/commands/reas/index.ts
📚 Learning: 2026-05-16T23:06:22.685Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 167
File: src/dev-dashboard/ui/src/routes/obsidian.tsx:12-12
Timestamp: 2026-05-16T23:06:22.685Z
Learning: In genesiscz/GenesisTools, the dev-dashboard UI is intentionally desktop-first in the routes under src/dev-dashboard/ui/src/routes. For fixed two-column grid layouts, do not require responsive `md:` breakpoint utility classes (e.g., missing `md:` variants) as long as mobile/phone layout is handled via the dedicated separate mobile layout logic (panel stacking vertically). When reviewing, avoid flagging the two-column grid for “missing mobile responsiveness” solely due to absent `md:` breakpoint classes.
Applied to files:
src/dev-dashboard/ui/src/routes/qa.tsx
🪛 ast-grep (0.42.2)
src/dev-dashboard/ui/src/routes/qa.tsx
[warning] 157-157: Usage of dangerouslySetInnerHTML detected. This bypasses React's built-in XSS protection. Always sanitize HTML content using libraries like DOMPurify before injecting it into the DOM to prevent XSS attacks.
Context: dangerouslySetInnerHTML
Note: [CWE-79] Improper Neutralization of Input During Web Page Generation [REFERENCES]
- https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
- https://cwe.mitre.org/data/definitions/79.html
(react-unsafe-html-injection)
🪛 OpenGrep (1.21.0)
src/dev-dashboard/e2e/qa.spec.ts
[ERROR] 41-44: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.
(coderabbit.command-injection.exec-js)
src/dev-dashboard/ui/src/routes/qa.tsx
[WARNING] 156-159: dangerouslySetInnerHTML with dynamic content can lead to XSS. Sanitize the input with a library like DOMPurify before rendering.
(coderabbit.xss.react-dangerously-set-innerhtml)
🔇 Additional comments (36)
src/dev-dashboard/lib/qa-render.test.ts (1)
1-58: LGTM!src/dev-dashboard/ui/src/components/QaSectionHeading.tsx (1)
1-13: LGTM!src/dev-dashboard/ui/src/styles.css (1)
4-4: LGTM!src/utils/DashboardApp/commander.ts (4)
36-43: Invalid--portvalues are silently accepted asNaN.
Number.parseIntcan produceNaN, andup()treats it as a defined port. Reject invalid input early.
109-110:--linesaccepts non-numeric input and forwards invalid values.Both parsers can return
NaN, which breaks tail sizing logic. Validate in the option parser.Also applies to: 117-118
126-132: Install command--porthas the same NaN parsing issue.Same pattern as
toUpOptions:Number.parseIntcan produceNaNfor invalid input like--port abc.
59-62: LGTM!src/utils/DashboardApp/index.ts (2)
22-23: Remove absolute local path from source comments.Embedding
/Users/Martin/...leaks local environment details and is non-portable.
13-14: LGTM!Also applies to: 45-45, 56-56, 62-62, 69-70, 116-118
src/utils/DashboardApp/launchd.ts (2)
173-174: Create~/Library/LaunchAgentsbefore writing the plist.On first-time installs that directory may not exist, so
writeFileSync(path, plist)can fail withENOENT.
42-81: LGTM!Also applies to: 83-101, 176-200
src/utils/DashboardApp/lifecycle.ts (9)
555-622: Useout.result()orout.println()for stdout output instead ofprocess.stdout.write.Per coding guidelines,
out.result()should be the stdout writer. Theattach()andlogs()functions write directly to stdout.
775-782: Avoid bare catch in process liveness probe.
catch {}hides error context and violates repo exception-handling rules. As per coding guidelines: "Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()."
68-93: LGTM!
176-259: LGTM!
261-334: LGTM!
336-375: LGTM!
377-461: LGTM!
468-519: LGTM!Also applies to: 521-540
624-756: LGTM!src/utils/DashboardApp/menu.ts (3)
109-111: Treat prompt cancellation as abort, not"skip".
Ctrl+C/Esc currently continues startup without the required dependency. Return an abort sentinel instead and handle it in the caller to stop the flow.
12-42: LGTM!
116-134: LGTM!src/question/commands/record.ts (1)
7-10: LGTM!src/shops/commands/ui.ts (1)
24-50: LGTM!src/utils/DashboardApp/logSession.ts (1)
1-55: LGTM!src/utils/DashboardApp/readiness.ts (1)
79-89: HTTP probe failures are still swallowed.This appears to be the same previously reported issue: the bare
catch {}drops probe error context and keeps timeout diagnostics opaque.src/utils/DashboardApp/types.ts (1)
9-10: Machine-specific absolute path still present in source comment.This looks like the same previously reported issue and should still be replaced with a repo-relative/generic reference.
src/utils/DashboardApp/pidFile.ts (1)
44-71: LGTM!src/utils/DashboardApp/portConflict.test.ts (1)
1-39: LGTM!src/utils/DashboardApp/readiness.test.ts (1)
1-15: LGTM!src/utils/DashboardApp/viteSpawn.test.ts (1)
1-22: LGTM!src/utils/DashboardApp/viteSpawn.ts (1)
1-34: LGTM!src/youtube/commands/ui.ts (2)
33-44: The--api-urloption placement issue was already flagged.The concern that
--api-urlis attached to the parent command and won't work withui up --api-url <url>(onlyui --api-url <url> upsyntax works in Commander v14) was raised in the prior review.
12-31: LGTM!src/utils/ui/dashboards.ts (1)
31-32: LGTM!Also applies to: 77-77
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (2)
src/dev-dashboard/ui/src/slate-grid.css (1)
55-116:⚠️ Potential issue | 🟠 Major | ⚡ Quick winReplace new raw QA colors with theme-token-driven values.
The new unread/recency styles hardcode palette colors instead of consuming theme tokens, which breaks the UI theming contract.
♻️ Suggested tokenized rewrite for the changed block
.dd-qa-card--unread { - border-color: rgba(52, 211, 153, 0.28); + border-color: color-mix(in srgb, var(--dd-accent-from) 28%, transparent); background: - linear-gradient(180deg, rgba(52, 211, 153, 0.07), transparent 55%), + linear-gradient(180deg, color-mix(in srgb, var(--dd-accent-from) 7%, transparent), transparent 55%), var(--dd-bg-panel); - box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.06); + box-shadow: 0 0 0 1px color-mix(in srgb, var(--dd-accent-from) 6%, transparent); } @@ .dd-qa-unread-badge { @@ - border: 1px solid rgba(52, 211, 153, 0.35); - background: rgba(52, 211, 153, 0.1); - color: `#6ee7b7`; + border: 1px solid color-mix(in srgb, var(--dd-accent-from) 35%, transparent); + background: color-mix(in srgb, var(--dd-accent-from) 10%, transparent); + color: var(--dd-accent-from); @@ .dd-qa-recency--hot { - color: `#34d399`; - text-shadow: 0 0 12px rgba(52, 211, 153, 0.65); + color: var(--dd-accent-from); + text-shadow: 0 0 12px color-mix(in srgb, var(--dd-accent-from) 65%, transparent); @@ .dd-qa-recency--fresh { - color: `#2dd4bf`; + color: var(--dd-accent-to); }As per coding guidelines: “Before writing or restyling web UI... never use raw palette colors, always use theme tokens.”
🤖 Prompt for 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. In `@src/dev-dashboard/ui/src/slate-grid.css` around lines 55 - 116, The CSS uses hardcoded colors in .dd-qa-card--unread, .dd-qa-unread-badge and all .dd-qa-recency--* classes; replace these raw hex/rgba values with the project theme tokens (CSS variables) instead (e.g. use --dd-border-accent, --dd-bg-accent, --dd-shadow-accent, --dd-text-accent, --dd-text-secondary, --dd-text-muted or equivalent tokens) so the unread card background, border, badge, text colors, shadow and the recency variants consume theme tokens rather than literal colors; update .dd-qa-unread-badge display rule to remain hidden by default and ensure .dd-qa-card--unread .dd-qa-unread-badge still toggles display.src/utils/DashboardApp/lifecycle.ts (1)
781-788:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winBare catch in process liveness probe.
This was flagged in a previous review. Per coding guidelines, bare
catch {}should log with context.Suggested fix
try { process.kill(pid, 0); return true; - } catch { + } catch (err) { + logger.debug({ err, pid }, "process liveness probe returned false"); return false; }As per coding guidelines: "Never use bare
catch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()."🤖 Prompt for 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. In `@src/utils/DashboardApp/lifecycle.ts` around lines 781 - 788, The isProcessAlive(pid: number) function uses a bare catch; update it to catch the error as a variable and log the caught error with context (e.g., include pid and the error) using the project logger (logger.debug or logger.warn) before returning false so failures are observable; keep the process.kill(pid, 0) check and the same boolean return behavior.
🤖 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 `@src/dev-dashboard/lib/front-proxy.ts`:
- Around line 35-63: The final throw in fetchProxiedUpstream is unreachable
because the loop either returns upstream or re-throws err on the last attempt;
either remove the terminal throw or keep it as an explicit defensive assertion
with a comment. Pick one: (A) delete the final throw line entirely from
fetchProxiedUpstream, or (B) retain it but prepend a short comment like
"defensive: should be unreachable due to returns/rethrows above" (or use an
explicit assertion/coverage-ignore marker) so intent is clear; update only the
fetchProxiedUpstream function.
In `@src/dev-dashboard/lib/qa-recency.ts`:
- Around line 56-61: The conditional checking ageDays < 7 is redundant because
both branches return the same stale object; remove the if/else and collapse to a
single return that returns { tier: "stale", relative: `${ageDays}d ago`, ageMs }
(locate the redundant branch around the ageDays check in qa-recency logic and
delete the if block that returns the identical value).
---
Duplicate comments:
In `@src/dev-dashboard/ui/src/slate-grid.css`:
- Around line 55-116: The CSS uses hardcoded colors in .dd-qa-card--unread,
.dd-qa-unread-badge and all .dd-qa-recency--* classes; replace these raw
hex/rgba values with the project theme tokens (CSS variables) instead (e.g. use
--dd-border-accent, --dd-bg-accent, --dd-shadow-accent, --dd-text-accent,
--dd-text-secondary, --dd-text-muted or equivalent tokens) so the unread card
background, border, badge, text colors, shadow and the recency variants consume
theme tokens rather than literal colors; update .dd-qa-unread-badge display rule
to remain hidden by default and ensure .dd-qa-card--unread .dd-qa-unread-badge
still toggles display.
In `@src/utils/DashboardApp/lifecycle.ts`:
- Around line 781-788: The isProcessAlive(pid: number) function uses a bare
catch; update it to catch the error as a variable and log the caught error with
context (e.g., include pid and the error) using the project logger (logger.debug
or logger.warn) before returning false so failures are observable; keep the
process.kill(pid, 0) check and the same boolean return behavior.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: bae12032-8ada-4d70-bd93-ab4d4e1207ed
📒 Files selected for processing (14)
src/dev-dashboard/index.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/src/slate-grid.csssrc/dev-dashboard/ui/vite-middleware.tssrc/question/lib/read-model.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/utils/DashboardApp/lifecycle.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{ts,tsx}: Do not useas anytype assertions; use proper type narrowing, type guards, or explicit interfaces instead
When working with union types, use discriminant checks (e.g.entity.className === "User") instead of type assertions
Never use barecatch {}blocks; at minimum log the caught error with context usinglogger.debug()orlogger.warn()
For functions with 3+ parameters or optional parameters, use an object parameter instead of positional parameters
Do not use one-lineifstatements, even for early returns; always use block form with braces
Add an empty line beforeifstatements unless the preceding line is a variable declaration used by thatif
Add an empty line after closing}unless followed byelse,catch,finally, or another}
Always checkisInteractive()from@app/utils/clibefore showing prompts; provide sensible defaults or error withsuggestCommand()in non-interactive mode
Files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
src/**/ui/**
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/ui/**: Before writing or restyling web UI, read.claude/docs/design-system.mdto ensure compliance with shared theme tokens and component primitives; never use raw palette colors, always use theme tokens
Never override a<Card>component's surface styling; pick rich Button/Card variants on purpose and wrap routes in shared shell/auth-layout
Files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/ui/src/slate-grid.csssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/vite-middleware.ts
src/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.ts: Always import and useSafeJSONfrom@app/utils/jsoninstead of the globalJSONobject; useSafeJSON.parse()andSafeJSON.stringify()everywhere
Uselogger(from@app/logger) for diagnostics; write to day-stamped file always and to stderr only when log level permits; useout.result()as the only writer to stdout
Log enough context to triage issues from logs alone without re-running the tool; log key decision branches, external-resource access, mode/config resolution, and result counts
Prefererror: errovererror: err instanceof Error ? err.message : String(err)when the error field accepts unknown type
Files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.ts: Never add a file-path comment as the first line of files (e.g.,// src/path/to/file.ts)
Do not add comments that restate what the code already says; avoid obvious comments like// Build initial contextbeforebuildContext()
Files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
src/**/*.test.ts
📄 CodeRabbit inference engine (CLAUDE.md)
When adding database logic, use an in-memory
new Database(":memory:")for testing; group test files alongside source files
Files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.ts
src/utils/
📄 CodeRabbit inference engine (CLAUDE.md)
When creating a new tool, check if helper functions are general-purpose and usable by other tools; if so, place them in
src/utils/instead of inside the tool directory
Files:
src/utils/DashboardApp/lifecycle.browser.test.tssrc/utils/DashboardApp/lifecycle.ts
src/**/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/index.ts: Tool entry points must use a TypeScript file with shebang that shows an interactive tool selector when run without arguments, and executes the specified tool viabun runwhen given arguments
Tool entry points must end withawait runTool(program, { tool })from@app/utils/cli, which owns-v/--readme/help registration and console-level resolution
Files:
src/dev-dashboard/index.ts
src/*/index.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Tool directories must contain either
index.ts/index.tsxor standalone.ts/.tsxfiles; tool name is derived from directory name or filename without extension
Files:
src/dev-dashboard/index.ts
🧠 Learnings (26)
📚 Learning: 2026-05-05T11:58:33.420Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/indexer/lib/sources/mail-source.dateSent.probe.test.ts:0-0
Timestamp: 2026-05-05T11:58:33.420Z
Learning: This repo uses Biome 2.x. The console lint rule is `noConsole` (located at `lint/suspicious/noConsole`), not `noConsoleLog`. In this codebase, `noConsole` is disabled in `biome.json`, so adding a `// biome-ignore lint/suspicious/noConsole:<...>` suppression comment is a no-op and should be avoided (CI flags it as having no effect). When reviewing, do not suggest adding Biome suppression comments for console usage; if a `console.*` call must remain, leave it without a `biome-ignore` comment.
Applied to files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T09:50:40.172Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 170
File: src/utils/ui/layouts/DashboardLayout.tsx:1-2
Timestamp: 2026-05-18T09:50:40.172Z
Learning: In the genesiscz/GenesisTools repo, UI visual correctness is verified via Playwright before/after sweeps plus canary screenshots (see CLAUDE.md “No Tests” and evidence under .claude/docs/assets/). During code reviews of TSX UI code, do NOT suggest adding snapshot tests, Storybook/story tests, or introducing any UI test framework. If visual correctness is in question, ask whether the relevant Playwright sweep/canary screenshot evidence has been captured and linked in .claude/docs/assets/ instead of proposing new UI test infrastructure.
Applied to files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/ui/src/routes/qa.tsx
📚 Learning: 2026-05-18T09:50:40.172Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 170
File: src/utils/ui/layouts/DashboardLayout.tsx:1-2
Timestamp: 2026-05-18T09:50:40.172Z
Learning: For this repository (genesiscz/GenesisTools), UI verification is intentionally done via Playwright: before/after sweep screenshot sweeps and canary runs, with evidence stored under .claude/docs/assets/ (e.g., ui-drift-*/ containing sweep/after PNGs). During code reviews of TSX/UI changes, do NOT recommend adding snapshot tests, story tests, or any new UI test framework. If visual correctness is questioned, first ask whether the relevant Playwright sweep/canary evidence has been captured (per the repo’s documented “No Tests” policy in CLAUDE.md) rather than requesting new test infrastructure.
Applied to files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/ui/src/routes/qa.tsx
📚 Learning: 2026-05-18T14:02:30.445Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 171
File: src/utils/ui/layouts/AuthLayout.tsx:34-34
Timestamp: 2026-05-18T14:02:30.445Z
Learning: When reviewing a PR, before leaving any comment on a specific file and hunk, verify that the file (and the relevant lines) actually exist in the PR’s current diff. For example, use `git diff --name-only <base>...<head>` (or the PR’s file list) to confirm the file is part of the diff, since pre-rebase/stale hunk references can lead to incorrect or outdated comments.
Applied to files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-18T15:39:25.103Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 173
File: src/question/commands/log.ts:0-0
Timestamp: 2026-05-18T15:39:25.103Z
Learning: In genesiscz/GenesisTools, when implementing colored terminal/CLI output in TypeScript code under src/, use `picocolors` imported as `pc` (e.g., `import pc from 'picocolors'`). Do not propose `chalk` for CLI coloring. For chained styling (e.g., what chalk would express as `bold` + `blue`), compose picocolors calls by nesting, such as `pc.bold(pc.blue(text))`. Treat any mention of chalk in outdated docs (e.g., CLAUDE.md) as non-authoritative for this guideline.
Applied to files:
src/dev-dashboard/ui/src/components/QaClockProvider.tsxsrc/dev-dashboard/ui/src/components/QaRecencyTime.tsxsrc/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/src/routes/qa.tsxsrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-24T15:32:37.494Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/output.ts:109-113
Timestamp: 2026-02-24T15:32:37.494Z
Learning: In TypeScript files under src/, do not require a leading blank line before an if statement that is the first statement inside a function body (immediately after the function signature). The blank line rule should only apply to if statements that come after other statements within the function body. Apply this guideline consistently across TS files in src to reduce unnecessary vertical whitespace and keep concise function bodies.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-09T13:13:58.786Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 81
File: src/github/commands/get.ts:209-212
Timestamp: 2026-03-09T13:13:58.786Z
Learning: In the GenesisTools repo (genesiscz/GenesisTools), do not treat CI formatter warnings as enforceable formatting rules for TypeScript files under src/. Focus reviews on logical correctness and consistency with existing code patterns. For files under src (e.g., src/github/commands/get.ts), prioritize code structure, readability, naming, correctness, and adherence to project conventions over automated formatting warnings from CI tools.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:31.610Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/timely/utils/entry-processor.ts:0-0
Timestamp: 2026-03-12T01:26:31.610Z
Learning: In code paths where JSON is consumed, prefer strict RFC 8259 validation by using SafeJSON.parse(text, { strict: true }) instead of the lenient default. Apply this at non-config boundaries (e.g., API responses, JSONL, cache outputs, subprocess outputs). Reserve the lenient comment-json behavior only for user-authored config files that may legitimately contain comments or trailing commas. For src/timely/utils/entry-processor.ts and similar modules, replace or wrap JSON parsing with SafeJSON.parse(text, { strict: true }) unless you are explicitly handling config files that require comments.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:58:27.831Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 103
File: src/port/index.ts:137-144
Timestamp: 2026-03-12T01:58:27.831Z
Learning: In GenesisTools, apply a no-obvious-comments rule: do not add inline comments for well-known POSIX patterns or standard idioms (e.g., a process.kill(pid, 0) probe) when surrounding code is self-documenting through descriptive function/variable names. This guidance applies to TypeScript files under src (src/**/*.ts). Only include comments if they add non-obvious rationale, edge-case behavior, or explain complex logic that cannot be inferred from code alone.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:44.520Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/commands/graph.ts:34-34
Timestamp: 2026-03-22T22:19:44.520Z
Learning: In genesiscz/GenesisTools, when using `SafeJSON.parse` in `src/**/*.ts`, it is acceptable to omit `{ strict: true }` if (and only if) the JSON being parsed is internal cache/state written by the same codebase (e.g., data saved by one internal writer and later read from a corresponding cached file). Do not require strict mode for these internal, machine-generated cache files. Require `{ strict: true }` at external/untrusted boundaries instead (e.g., API responses, third-party JSONL, subprocess output, or any JSON whose contents may not have been produced by trusted internal code).
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-25T19:55:27.917Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/search/stores/vector-store.ts:19-23
Timestamp: 2026-03-25T19:55:27.917Z
Learning: When reviewing this codebase’s “3+ parameters → object parameter” guideline, only suggest object-parameter refactoring when the function’s parameters are ambiguous or include optional/unclear semantics. Do not flag tightly-defined utility/helper functions where (1) all parameters are required, (2) meanings are semantically clear from parameter names, and (3) the ordering is well-ordered and obvious. For example, functions like bruteForceVectorSearch(memoryIndex, queryVector, limit) should be allowed to keep positional parameters because the intent is clear.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-05T03:52:21.057Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 163
File: src/debugging-master/core/dashboard-server.ts:115-127
Timestamp: 2026-05-05T03:52:21.057Z
Learning: When reviewing Bun.serve fetch handlers in this repo, don’t treat `req.signal` as possibly `undefined` at runtime. Bun guarantees an `AbortSignal` on every incoming Request, so `req.signal?.addEventListener(...)` is unnecessary for runtime safety and is only a TypeScript narrowing artifact (e.g., the type might be `AbortSignal | null`). Therefore, don’t raise concerns about SSE/subscription cleanup being skipped because `req.signal` could be missing; cleanup decisions should be based on the actual handler lifecycle, not an imagined runtime absence of `req.signal`.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-02-24T15:32:44.925Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 54
File: src/github/lib/review-output.ts:18-20
Timestamp: 2026-02-24T15:32:44.925Z
Learning: In TypeScript files, do not require a blank line between the opening brace of a function and the first statement if the first statement is the if statement immediately after the signature. The blank-line rule applies to separating an if from unrelated preceding code within the same block, not to spacing after the function opening brace. Apply this rule to all TS functions across the codebase.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:03.611Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/ask/lib/ChatSessionManager.ts:0-0
Timestamp: 2026-03-12T01:26:03.611Z
Learning: Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation in all non-config boundaries (API responses, JSONL, cache, subprocess output). The 3-arg form SafeJSON.parse(text, null, { strict: true }) is invalid and should not be used. Only lenient default (no options) is appropriate for user-authored config files that may contain comments/trailing commas. Apply this guideline across TypeScript files (src/**/*.ts) wherever SafeJSON.parse is used.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:18.985Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/claude/lib/history/search.ts:0-0
Timestamp: 2026-03-12T01:26:18.985Z
Learning: When using SafeJSON.parse in TypeScript code, prefer the two-argument form SafeJSON.parse(text, { strict: true }) to enable strict RFC 8259 validation via the native JSON.parse. Do NOT use the three-argument form SafeJSON.parse(text, null, { strict: true }). Apply strict parsing at remote/third-party API boundaries, JSONL parsing points, and subprocess output. Fall back to the lenient/default form only for user-authored config files that may legitimately contain comments or trailing commas. This pattern keeps strict validation where appropriate and preserves leniency for internal/config data.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:27.000Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/debugging-master/commands/tail.ts:0-0
Timestamp: 2026-03-12T01:26:27.000Z
Learning: In the genesiscz/GenesisTools repository, prefer using SafeJSON.parse(text, { strict: true }) (2-argument form) at all non-config JSON boundaries such as API responses, JSONL parsers, cache files, and subprocess stdout. Reserve the lenient default (SafeJSON.parse(text) with no options) only for user-authored config files that may legitimately contain comments or trailing commas.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T01:26:24.859Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 95
File: src/azure-devops/commands/history-sync.ts:0-0
Timestamp: 2026-03-12T01:26:24.859Z
Learning: In GenesisTools, ensure SafeJSON.parse is called with exactly two arguments. Use SafeJSON.parse(text, { strict: true }) for strict RFC 8259 validation, or pass a reviver function as the second argument. Do not call SafeJSON.parse(text, null, { strict: true }) since the function signature does not support a three-argument form. Apply this guideline to all TypeScript files that use SafeJSON.parse (e.g., src/utils/json.ts) and other related code.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-17T01:30:56.939Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 107
File: src/utils/macos/tts.ts:130-139
Timestamp: 2026-03-17T01:30:56.939Z
Learning: In genesiscz/GenesisTools, do not suggest converting two-argument functions with an optional second parameter (for example setMute(muted: boolean, app?: string)) to an object-parameter form. The project prefers simple positional parameters for short utility functions, even when an optional argument is present. The object-parameter guideline should only apply when a function has 3 or more parameters.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:49.876Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/indexer/index.ts:41-56
Timestamp: 2026-03-22T22:19:49.876Z
Learning: When using Bun projects, treat `import.meta.dir` as an absolute directory path provided by Bun. If you build paths by concatenating with `import.meta.dir` (e.g., `import.meta.dir + "/file.ts"`), do not require `path.resolve()` as it would be redundant. Only apply `path.resolve()` guidance when the base path is relative (not when the base is already an absolute `import.meta.dir`).
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-12T03:48:42.474Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 104
File: src/darwinkit/index.ts:146-156
Timestamp: 2026-03-12T03:48:42.474Z
Learning: In TypeScript files that use Commander subcommands and exit after showing help, replace code after Command.help() with the pattern: call sub.outputHelp(); (returns void) followed by process.exit(0) or process.exit(1). This avoids TS7027 unreachable-code because Command.help() returns never. Apply this pattern in all src/**/*.ts files where subcommands need to display help before exiting.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/question/lib/read-model.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.tssrc/dev-dashboard/ui/vite-middleware.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.tssrc/dev-dashboard/index.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-22T22:19:53.048Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 119
File: src/utils/search/stores/qdrant-vector-store.test.ts:192-206
Timestamp: 2026-03-22T22:19:53.048Z
Learning: In src/**/*.test.ts, it is acceptable to include comments that explain the semantic role or conceptual grouping of numeric/vector test data clusters (e.g., “Cluster 1: 'code' vectors”, “Query close to 'docs' cluster”). Even if variable/identifier names partially suggest intent, these comments should be treated as readable context (describing how clusters/queries relate conceptually) rather than “obvious comments,” and should not be flagged by the no-obvious-comments rule when they genuinely clarify the test data grouping and relationships.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/utils/DashboardApp/lifecycle.browser.test.tssrc/question/lib/read-model.test.ts
📚 Learning: 2026-05-17T14:59:03.963Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 167
File: src/dev-dashboard/lib/ttyd/manager.ts:1-1
Timestamp: 2026-05-17T14:59:03.963Z
Learning: When spawning long-lived daemon child processes in this repo with Bun.spawn (e.g., dashboard subprocess managers), always use Bun’s object form: `Bun.spawn({ cmd, detached: true, ... })` and then call `.unref()` on the returned process. Use `detached: true` (requires Bun >= 0.6.0; it creates a new process group / uses setsid) so the child does not receive SIGHUP when the dashboard parent exits; also call `.unref()` so the parent can exit without waiting on the child. Do not omit `detached: true` for daemon-like subprocesses, since it can cause the child to die with the parent and lead to proxy failures (e.g., 502s) on routes depending on that process.
Applied to files:
src/dev-dashboard/lib/qa-recency.test.tssrc/dev-dashboard/lib/front-proxy.test.tssrc/dev-dashboard/lib/qa-recency.tssrc/dev-dashboard/lib/front-proxy.ts
📚 Learning: 2026-03-25T21:01:55.569Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:104-111
Timestamp: 2026-03-25T21:01:55.569Z
Learning: For GenesisTools utilities under src/utils/**, Windows path support is required. When reviewing files in src/utils, treat POSIX-only path handling as a CRITICAL issue—e.g., code that searches for only "/" as the path separator or ignores "\\". Ensure path utility functions correctly handle both separators ("/" and "\\"), for example by using regex patterns like /[\\/]/ when parsing or splitting paths.
Applied to files:
src/utils/DashboardApp/lifecycle.browser.test.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-03-26T00:12:19.016Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 129
File: src/utils/string.ts:100-103
Timestamp: 2026-03-26T00:12:19.016Z
Learning: In this repo’s utility files (src/utils/**/*.ts), prefer minimal JSDoc for functions like truncatePath(path, maxLength). Do not add “obvious” implementation details (e.g., explicitly listing handled path separators such as / and \\) when the function/parameter names are self-documenting. Only expand JSDoc when there is non-obvious rationale, important design constraints, or edge-case behavior that would otherwise be unclear to reviewers.
Applied to files:
src/utils/DashboardApp/lifecycle.browser.test.tssrc/utils/DashboardApp/lifecycle.ts
📚 Learning: 2026-05-16T23:06:22.685Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 167
File: src/dev-dashboard/ui/src/routes/obsidian.tsx:12-12
Timestamp: 2026-05-16T23:06:22.685Z
Learning: In genesiscz/GenesisTools, the dev-dashboard UI is intentionally desktop-first in the routes under src/dev-dashboard/ui/src/routes. For fixed two-column grid layouts, do not require responsive `md:` breakpoint utility classes (e.g., missing `md:` variants) as long as mobile/phone layout is handled via the dedicated separate mobile layout logic (panel stacking vertically). When reviewing, avoid flagging the two-column grid for “missing mobile responsiveness” solely due to absent `md:` breakpoint classes.
Applied to files:
src/dev-dashboard/ui/src/routes/qa.tsx
📚 Learning: 2026-05-19T18:33:15.211Z
Learnt from: genesiscz
Repo: genesiscz/GenesisTools PR: 176
File: src/telegram/index.ts:25-28
Timestamp: 2026-05-19T18:33:15.211Z
Learning: When reviewing legacy CLI entrypoint files (e.g., src/**/index.ts) that call `await runTool(program, { tool: "..." })`, allow the `.catch()` handler to keep `console.error(err); process.exit(1)` without requiring a switch to `logger.error` **only** for minimal-touch migrations that were done solely to satisfy the “no-default-import” gate and that add no new feature/behavior code. If the PR introduces any new feature logic or expands the catch-handling beyond that migration, prefer `logger.error` (and follow the repo’s normal logging conventions).
Applied to files:
src/dev-dashboard/index.ts
🔇 Additional comments (26)
src/dev-dashboard/ui/src/components/QaClockProvider.tsx (1)
1-23: LGTM!src/dev-dashboard/ui/src/components/QaRecencyTime.tsx (1)
1-26: LGTM!src/dev-dashboard/lib/qa-recency.test.ts (1)
1-33: LGTM!src/dev-dashboard/ui/src/slate-grid.css (1)
118-127: LGTM!src/dev-dashboard/lib/front-proxy.test.ts (1)
9-9: LGTM!Also applies to: 126-131
src/question/lib/read-model.ts (1)
167-185: LGTM!src/utils/DashboardApp/lifecycle.browser.test.ts (1)
1-37: LGTM!src/question/lib/read-model.test.ts (1)
6-6: LGTM!Also applies to: 58-69
src/dev-dashboard/ui/src/routes/qa.tsx (7)
251-253: Bare catch block should log the error.The catch block swallows errors silently. Per coding guidelines, at minimum log with
logger.debug().However, since this is client-side React code running in the browser (not server-side), there's no
loggeravailable. Aconsole.debugwould be appropriate here for debugging, or you could simply leave it as-is given this is intentional best-effort behavior. Consider adding minimal context:.catch(() => { - /* best-effort — unread styling is client-side until next load */ + // best-effort — unread styling is client-side until next load });Given the comment explains the intentional behavior and this is browser-side code, this is acceptable.
6-12: LGTM!
140-213: LGTM!
283-291: LGTM!
293-315: LGTM!
334-340: LGTM!
373-379: LGTM!src/utils/DashboardApp/lifecycle.ts (2)
555-622:process.stdout.writeusage in attach/logs functions.This was flagged in a previous review. Per coding guidelines,
out.result()should be the only stdout writer.However, for log tailing (
attachandlogs), rawprocess.stdout.writemay be intentional to preserve exact log formatting without any wrapper transformation. Ifout.result()adds any formatting or newline handling, it could corrupt the streamed log output.Consider documenting this as an intentional exception or verifying that
out.result()can handle raw log streaming without modification.
624-636: Updated browser-open logic looks correct.The new logic correctly handles:
opts.open === false→ explicit override to not open- Falls back to
config.openBrowser?.enabled ?? falseThis aligns with Commander's negatable
--no-openflag behavior.src/dev-dashboard/ui/vite-middleware.ts (2)
367-382: LGTM!
448-448: LGTM!src/dev-dashboard/lib/qa-recency.ts (1)
1-54: LGTM!src/dev-dashboard/lib/front-proxy.ts (2)
22-25: LGTM!
171-184: LGTM!src/dev-dashboard/index.ts (4)
78-92: LGTM!
94-106: LGTM!
144-163: LGTM!
176-191: LGTM!
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
…recency, and gradient headings
…ollable cmux preview
…, add MCP instructions
d2111cc to
bdc8f9c
Compare
Summary
Foundation + all 8 dashboard migrations to the DashboardApp factory that unifies every
tools <foo>dashboard/server launcher in the repo. Replaces 8 hand-rolled launchers (each with subtly different signal handling, port-conflict UX, browser-open timing, and no graceful stop) with one Commander factory.Closes the 2-day reas-zombie class (orphan after parent-shell death) and the multi-Vite optimize-deps collision discovered earlier this week.
What ships in this PR
Foundation (
src/utils/DashboardApp/)defineDashboardApp({ type: 'ui'|'server', key, commandName, spawn, readiness, dependencies, openBrowser, launchd })returns a Commander subcommand with consistent verbs:<commandName>(no verb)--forceescape hatchup--foregroundto block.--port <n>override.down--no-forceto skip SIGKILL escalation.restartstatusattachtail -fthe bg log; ^C detaches the tail, not the process.logs --lines Ninstall/uninstallKey infrastructure:
src/utils/network.ts's newgetPortOwner) — picked overisPortInUseafter discovering the IPv4-only socket probe misses IPv6-bound Vite.spawnDashboardhelper (src/utils/process/spawnDashboard.ts) — signal forwarding + PPID=1 orphan polling for foreground launchers. Catches macOS's lack ofPR_SET_PDEATHSIG.toolsouter launcher orphan-poll — same protection at the outermost level so everytools <foo>command inherits it.cacheDir(src/utils/ui/vite.base.ts) —node_modules/.vite-cache/<slug>/anchored on outermost.gitso parallel Vite servers don't race each other's optimize-deps versioner, and so dashboards with nestednode_modules(shops) don't split the React resolution chain.az-cli.utils.ts(src/azure-devops/lib/) — single source of truth foraz logincommand suggestions. Primary form is--allow-no-subscriptions --use-device-code; fallbackaz login --scope 499b84ac-1321-427f-aa17-267ca6975798/.default --allow-no-subscriptionsfor tenants whose Conditional Access policy blocks device code (AADSTS530036). All call sites (cli.utils.ts,index.tsbanner,lib/ado-configure.ts, README) now go through the helper.Migrations (all 8 complete)
tools clarity ui)tools shops ui) — deletedsrc/shops/lib/ui-launcher.tstools claude history dashboard)tools youtube server,type: "server", launchd labelcom.genesis-tools.youtube-serverpreserved)tools youtube ui, server dependency with"prompt"policy)tools internal reas ui;--dashboardflag preserved as back-compat)tools dev-dashboard ui; front-proxy via hidden__ui-serversubcommand)tools dashboard;--prodPM2 path preserved)Bug fixes folded in
<commandName>action now only accepts-i, --interactive; explicit flags live only onup.program.parse(...)switched to{ from: "node" }so Bun's argv layout doesn't confuse Commander.lifecycle.tsandspawnDashboard.tsnow useimport { logger } from "@app/logger"matching the post-feat(logger): @app/logger/client + inquirerBackend + console.* sweep #179 facade.chalk/supports-hyperlinks/supports-colorfrom pre-bundling (504 dep optimization crash on claude-history)..gitcache collision —resolveGitRoot()walks to outermost.git; removed stray template.gitfromsrc/claude-history-dashboard/.@app/logger/client+@app/utils/jsonaliases insrc/dashboard/apps/web/vite.config.ts.Test plan
tools clarity ui— up/status/down + HTTP 200tools shops ui— up/status/down + HTTP 307 (auth redirect, expected)tools claude history dashboard— up/status/down + HTTP 200tools youtube server— up/status/down + API HTTP 200tools youtube ui— up/status/down + HTTP 200tools internal reas ui— up/status/down + HTTP 200tools dev-dashboard ui— up/status/down + HTTP 200tools dashboard— up/status/down + HTTP 200 (WorkOS signin redirect)bun tsgo --noEmitcleanbun x @biomejs/biome checkclean on migrated pathsKnown follow-up (out of scope)
downmay leave turbo/vite child orphans — same class as pre-migration; lifecycle improvement tracked separately.🤖 Plan:
.claude/plans/2026-05-20-DashboardAppMigration.mdSummary by CodeRabbit
New Features
Bug Fixes / Reliability
Tests
Documentation
Dependencies