Skip to content

Cross-platform restart script, pnpm 10 overrides migration, passthrough-reason dashboard detail#125

Open
SiNaPsEr0x wants to merge 5 commits into
teamchong:mainfrom
SiNaPsEr0x:main
Open

Cross-platform restart script, pnpm 10 overrides migration, passthrough-reason dashboard detail#125
SiNaPsEr0x wants to merge 5 commits into
teamchong:mainfrom
SiNaPsEr0x:main

Conversation

@SiNaPsEr0x

Copy link
Copy Markdown

Summary

Three independent fixes/improvements bundled together:

1. Cross-platform restart script

  • Replaces scripts/restart.sh (Bash) with scripts/restart.mjs (Node), so pnpm restart works on Windows without requiring git-bash/WSL.
  • Adds .gitattributes to force *.sh text eol=lf, preventing CRLF corruption of any remaining shell scripts on Windows checkouts.
  • Drops tests/restart.test.sh (Bash-only test for the removed script) and the corresponding test:restart npm script; the new restart.mjs behavior is exercised manually since it's a thin process-management wrapper.

2. pnpm 10 overrides migration

  • Moves the pnpm.overrides block from package.json to pnpm-workspace.yaml, which is where pnpm 10 actually reads overrides from (the package.json location is silently ignored on pnpm 10, so the ws/vite/undici/esbuild security pins were not being applied).
  • Adds an explicit allowScripts block for esbuild, sharp, and workerd so pnpm install doesn't prompt/block on their postinstall scripts.

3. Passthrough-reason detail (transform / tracker / dashboard / shell log)

  • Adds a new render_not_profitable passthrough reason (distinct from the existing not_profitable) and a kept_sharp counter, threaded through TransformInfoTrackEvent → dashboard RecentRow.
  • Introduces PASSTHROUGH_REASON_LABELS and formatPassthroughReasons() in src/core/transform.ts as the single source of truth for reason labels, consumed by both the shell logger (src/node.ts, new passthrough[...] log tag) and the dashboard (src/dashboard/fragments.ts) so the CLI log and the web UI never drift out of sync.
  • Dashboard "Sent as" column: collapses below_threshold / not_profitable / render_not_profitable into a single text badge with a tooltip breakdown (previously showed a confusing "image below threshold" label on rows that were actually sent as text), and keeps kept_sharp as its own visible badge since that's an image that intentionally skipped compression, not text.

4. Misc

  • .gitignore: exclude local log_chat.html export artifact.

Testing

  • pnpm typecheck / existing vitest suite (transform/tracker coverage unaffected by the additive fields).
  • Manually verified pnpm restart on Windows (git-bash) and confirmed the previous $'\r': command not found failure is gone.
  • Manually verified pnpm install no longer needs interactive approval for esbuild/sharp/workerd postinstall scripts, and that the ws/vite/undici/esbuild overrides are actually applied (pnpm why <pkg>).

Happy to split into separate PRs if preferred — flagging here in case reviewers want the pnpm-overrides fix isolated since it's the most "drop-in" of the three.

SiNaPsEr0x and others added 5 commits July 19, 2026 18:37
- transform: whitelist XML tags with static/dynamic split
- tracker/library: post-render profitability verification
- dashboard: surface passthrough reasons (fragments/types)
- scripts: replace restart.sh with cross-platform restart.mjs (+ .gitattributes)
- build: migrate to pnpm workspace overrides
- chore: ignore local log_chat.html export
The file no longer exists in the repo and never appears in its history.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A26PMoMZzofxidLchQNN6o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants