From 34b60c7d536b75cebcba4fe97912276454e4a19a Mon Sep 17 00:00:00 2001 From: Tommaso Casaburi Date: Tue, 28 Apr 2026 14:25:16 +0700 Subject: [PATCH] chore(portless): upgrade local dev URLs --- .claude/agents/browser-check.md | 10 ++-- .claude/agents/profiler.md | 6 +-- .claude/skills/inspect-elements/SKILL.md | 6 +-- .claude/skills/profile-browsing/SKILL.md | 4 +- .codex/agents/browser-check.toml | 2 +- .codex/skills/inspect-elements/SKILL.md | 6 +-- .codex/skills/profile-browsing/SKILL.md | 4 +- .cursor/agents/browser-check.md | 10 ++-- .cursor/agents/profiler.md | 6 +-- .cursor/skills/inspect-elements/SKILL.md | 6 +-- .cursor/skills/profile-browsing/SKILL.md | 4 +- AGENTS.md | 6 +-- README.md | 6 +-- docs/agent-playbooks/known-surprises.md | 10 ++-- .../pretext-feed-sizing/progress.md | 12 ++--- electron/main.js | 2 +- package.json | 6 +-- public/llms.txt | 2 +- scripts/AGENTS.md | 2 +- scripts/agent-init.sh | 8 +-- scripts/start-android-usb.mjs | 2 +- scripts/start-dev.js | 50 +++++++++++-------- yarn.lock | 10 ++-- 23 files changed, 92 insertions(+), 88 deletions(-) diff --git a/.claude/agents/browser-check.md b/.claude/agents/browser-check.md index 98594c9e..dbc76080 100644 --- a/.claude/agents/browser-check.md +++ b/.claude/agents/browser-check.md @@ -19,7 +19,7 @@ If either is missing, report back asking for the missing information. ### Step 1: Use the Existing Dev Server -Use the already-running Portless dev server at `http://5chan.localhost:1355` unless the parent agent gives you a different URL. +Use the already-running Portless dev server at `https://5chan.localhost` unless the parent agent gives you a different URL. Do not start, restart, or stop the dev server yourself. If the app is unreachable, report the failure and stop. @@ -30,9 +30,9 @@ Default to a fresh isolated `playwright-cli` browser session. If the requested v Use playwright-cli to check the relevant page in all three browser engines with separate sessions: ```bash -playwright-cli -s=verify-chrome open http://5chan.localhost:1355 --browser=chrome -playwright-cli -s=verify-firefox open http://5chan.localhost:1355 --browser=firefox -playwright-cli -s=verify-webkit open http://5chan.localhost:1355 --browser=webkit +playwright-cli -s=verify-chrome open https://5chan.localhost --browser=chrome +playwright-cli -s=verify-firefox open https://5chan.localhost --browser=firefox +playwright-cli -s=verify-webkit open https://5chan.localhost --browser=webkit ``` Navigate each engine session to the specific page/route where the change should be visible. @@ -62,7 +62,7 @@ playwright-cli -s=verify-webkit snapshot ## Browser Check Results ### Page Tested -- URL: http://5chan.localhost:1355/... +- URL: https://5chan.localhost/... ### What Was Checked - description of each verification diff --git a/.claude/agents/profiler.md b/.claude/agents/profiler.md index 37a21a5f..4f551bd6 100644 --- a/.claude/agents/profiler.md +++ b/.claude/agents/profiler.md @@ -4,7 +4,7 @@ model: haiku description: Performance profiler that browses 5chan routes via playwright-cli, collecting Web Vitals and React rerender data via react-scan. Returns a structured issues list for a batch of routes. Use proactively when profiling browsing performance, finding bottlenecks, or diagnosing excessive React rerenders. --- -You are a performance profiling agent for the 5chan React app at http://5chan.localhost:1355. You use playwright-cli to automate browsing and collect both browser-level (Web Vitals) and React-level (commit counts, per-component render data via react-scan) performance metrics. +You are a performance profiling agent for the 5chan React app at https://5chan.localhost. You use playwright-cli to automate browsing and collect both browser-level (Web Vitals) and React-level (commit counts, per-component render data via react-scan) performance metrics. **MUST: Never start a dev server.** The orchestrator guarantees one is already running. If the app is unreachable, report the error and stop — do not run `yarn start` or any other server command. @@ -49,7 +49,7 @@ playwright-cli -s=SESSION run-code "async page => await page.addInitScript(() => `window.__PROFILING__=true` tells react-scan to disable its toolbar and sounds during automated profiling. ```bash -playwright-cli -s=SESSION goto http://5chan.localhost:1355 +playwright-cli -s=SESSION goto https://5chan.localhost playwright-cli -s=SESSION tracing-start ``` @@ -62,7 +62,7 @@ For each route, navigate, interact, and **collect data before moving to the next ```bash # Navigate playwright-cli -s=SESSION eval "performance.mark('pre-ROUTE')" -playwright-cli -s=SESSION goto http://5chan.localhost:1355/ROUTE +playwright-cli -s=SESSION goto https://5chan.localhost/ROUTE playwright-cli -s=SESSION snapshot playwright-cli -s=SESSION eval "performance.mark('post-ROUTE');performance.measure('ROUTE','pre-ROUTE','post-ROUTE')" diff --git a/.claude/skills/inspect-elements/SKILL.md b/.claude/skills/inspect-elements/SKILL.md index 06ff3919..c1f74a3f 100644 --- a/.claude/skills/inspect-elements/SKILL.md +++ b/.claude/skills/inspect-elements/SKILL.md @@ -9,7 +9,7 @@ Use this skill to jump from a concrete DOM node in the running 5chan app to the ## Prerequisites -- Dev server running at `http://5chan.localhost:1355` +- Dev server running at `https://5chan.localhost` - `playwright-cli` installed - Use the local dev app, not production. The element-source helpers are only exposed in dev mode. @@ -33,8 +33,8 @@ The result includes: ## Session setup ```bash -playwright-cli -s=inspect open http://5chan.localhost:1355 -playwright-cli -s=inspect goto http://5chan.localhost:1355/all +playwright-cli -s=inspect open https://5chan.localhost +playwright-cli -s=inspect goto https://5chan.localhost/all playwright-cli -s=inspect eval "window.__ELEMENT_SOURCE__?.ready ?? false" playwright-cli -s=inspect snapshot ``` diff --git a/.claude/skills/profile-browsing/SKILL.md b/.claude/skills/profile-browsing/SKILL.md index ab8e103b..1fc6821e 100644 --- a/.claude/skills/profile-browsing/SKILL.md +++ b/.claude/skills/profile-browsing/SKILL.md @@ -9,7 +9,7 @@ Two-layer profiling: browser-level symptoms (Web Vitals, long tasks, scroll jank ## Prerequisites -- Dev server running at http://5chan.localhost:1355 (`yarn start` via Portless) +- Dev server running at https://5chan.localhost (`yarn start` via Portless) - `playwright-cli` installed (`npm install -g @playwright/cli@latest`) **IMPORTANT:** The orchestrator (you) is responsible for ensuring exactly ONE dev server is running. Profiler subagents must NEVER start a dev server themselves. @@ -31,7 +31,7 @@ Before spawning any profiler subagents, verify exactly one dev server is availab ```bash # Check if the dev server is reachable -curl -sf http://5chan.localhost:1355 -o /dev/null && echo "OK" || echo "NOT RUNNING" +curl -sf https://5chan.localhost -o /dev/null && echo "OK" || echo "NOT RUNNING" ``` - If **OK**: proceed to Step 1. diff --git a/.codex/agents/browser-check.toml b/.codex/agents/browser-check.toml index b41c3811..65b46cd7 100644 --- a/.codex/agents/browser-check.toml +++ b/.codex/agents/browser-check.toml @@ -3,7 +3,7 @@ model_reasoning_effort = "medium" sandbox_mode = "read-only" developer_instructions = """ Verify only the route, user flow, and acceptance criteria the parent agent gives you. -Use playwright-cli against the already-running local app at http://5chan.localhost:1355 unless the parent agent gives a different URL. Never start, restart, or stop the dev server. +Use playwright-cli against the already-running local app at https://5chan.localhost unless the parent agent gives a different URL. Never start, restart, or stop the dev server. Default to a fresh isolated playwright-cli browser session. If verification depends on auth, cookies, extensions, open tabs, or other existing browser state and the parent agent did not specify session mode, stop and ask whether to use a fresh browser or the contributor's current browser session. Never attach to a live personal browser session without explicit permission. If current-session reuse is requested, use the supported attach path only when available; otherwise report the limitation instead of silently switching modes. Run the requested verification flow in all three main browser engines: chrome/Blink, firefox/Gecko, and webkit/Safari. Use separate named playwright-cli sessions per engine unless the parent agent explicitly requires a different attach mode. diff --git a/.codex/skills/inspect-elements/SKILL.md b/.codex/skills/inspect-elements/SKILL.md index 06ff3919..c1f74a3f 100644 --- a/.codex/skills/inspect-elements/SKILL.md +++ b/.codex/skills/inspect-elements/SKILL.md @@ -9,7 +9,7 @@ Use this skill to jump from a concrete DOM node in the running 5chan app to the ## Prerequisites -- Dev server running at `http://5chan.localhost:1355` +- Dev server running at `https://5chan.localhost` - `playwright-cli` installed - Use the local dev app, not production. The element-source helpers are only exposed in dev mode. @@ -33,8 +33,8 @@ The result includes: ## Session setup ```bash -playwright-cli -s=inspect open http://5chan.localhost:1355 -playwright-cli -s=inspect goto http://5chan.localhost:1355/all +playwright-cli -s=inspect open https://5chan.localhost +playwright-cli -s=inspect goto https://5chan.localhost/all playwright-cli -s=inspect eval "window.__ELEMENT_SOURCE__?.ready ?? false" playwright-cli -s=inspect snapshot ``` diff --git a/.codex/skills/profile-browsing/SKILL.md b/.codex/skills/profile-browsing/SKILL.md index eaed2fe0..3927c608 100644 --- a/.codex/skills/profile-browsing/SKILL.md +++ b/.codex/skills/profile-browsing/SKILL.md @@ -9,7 +9,7 @@ Two-layer profiling: browser-level symptoms (Web Vitals, long tasks, scroll jank ## Prerequisites -- Dev server running at http://5chan.localhost:1355 (`yarn start` via Portless) +- Dev server running at https://5chan.localhost (`yarn start` via Portless) - `playwright-cli` installed (`npm install -g @playwright/cli@latest`) **IMPORTANT:** The orchestrator (you) is responsible for ensuring exactly ONE dev server is running. Profiler subagents must NEVER start a dev server themselves. @@ -31,7 +31,7 @@ Before spawning any profiler subagents, verify exactly one dev server is availab ```bash # Check if the dev server is reachable -curl -sf http://5chan.localhost:1355 -o /dev/null && echo "OK" || echo "NOT RUNNING" +curl -sf https://5chan.localhost -o /dev/null && echo "OK" || echo "NOT RUNNING" ``` - If **OK**: proceed to Step 1. diff --git a/.cursor/agents/browser-check.md b/.cursor/agents/browser-check.md index 60c035fb..44f8f4d7 100644 --- a/.cursor/agents/browser-check.md +++ b/.cursor/agents/browser-check.md @@ -19,7 +19,7 @@ If either is missing, report back asking for the missing information. ### Step 1: Use the Existing Dev Server -Use the already-running Portless dev server at `http://5chan.localhost:1355` unless the parent agent gives you a different URL. +Use the already-running Portless dev server at `https://5chan.localhost` unless the parent agent gives you a different URL. Do not start, restart, or stop the dev server yourself. If the app is unreachable, report the failure and stop. @@ -30,9 +30,9 @@ Default to a fresh isolated `playwright-cli` browser session. If the requested v Use playwright-cli to check the relevant page in all three browser engines with separate sessions: ```bash -playwright-cli -s=verify-chrome open http://5chan.localhost:1355 --browser=chrome -playwright-cli -s=verify-firefox open http://5chan.localhost:1355 --browser=firefox -playwright-cli -s=verify-webkit open http://5chan.localhost:1355 --browser=webkit +playwright-cli -s=verify-chrome open https://5chan.localhost --browser=chrome +playwright-cli -s=verify-firefox open https://5chan.localhost --browser=firefox +playwright-cli -s=verify-webkit open https://5chan.localhost --browser=webkit ``` Navigate each engine session to the specific page/route where the change should be visible. @@ -62,7 +62,7 @@ playwright-cli -s=verify-webkit snapshot ## Browser Check Results ### Page Tested -- URL: http://5chan.localhost:1355/... +- URL: https://5chan.localhost/... ### What Was Checked - description of each verification diff --git a/.cursor/agents/profiler.md b/.cursor/agents/profiler.md index 127a611b..bb2888ef 100644 --- a/.cursor/agents/profiler.md +++ b/.cursor/agents/profiler.md @@ -4,7 +4,7 @@ model: composer-2 description: Performance profiler that browses 5chan routes via playwright-cli, collecting Web Vitals and React rerender data via react-scan. Returns a structured issues list for a batch of routes. Use proactively when profiling browsing performance, finding bottlenecks, or diagnosing excessive React rerenders. --- -You are a performance profiling agent for the 5chan React app at http://5chan.localhost:1355. You use playwright-cli to automate browsing and collect both browser-level (Web Vitals) and React-level (commit counts, per-component render data via react-scan) performance metrics. +You are a performance profiling agent for the 5chan React app at https://5chan.localhost. You use playwright-cli to automate browsing and collect both browser-level (Web Vitals) and React-level (commit counts, per-component render data via react-scan) performance metrics. **MUST: Never start a dev server.** The orchestrator guarantees one is already running. If the app is unreachable, report the error and stop — do not run `yarn start` or any other server command. @@ -49,7 +49,7 @@ playwright-cli -s=SESSION run-code "async page => await page.addInitScript(() => `window.__PROFILING__=true` tells react-scan to disable its toolbar and sounds during automated profiling. ```bash -playwright-cli -s=SESSION goto http://5chan.localhost:1355 +playwright-cli -s=SESSION goto https://5chan.localhost playwright-cli -s=SESSION tracing-start ``` @@ -62,7 +62,7 @@ For each route, navigate, interact, and **collect data before moving to the next ```bash # Navigate playwright-cli -s=SESSION eval "performance.mark('pre-ROUTE')" -playwright-cli -s=SESSION goto http://5chan.localhost:1355/ROUTE +playwright-cli -s=SESSION goto https://5chan.localhost/ROUTE playwright-cli -s=SESSION snapshot playwright-cli -s=SESSION eval "performance.mark('post-ROUTE');performance.measure('ROUTE','pre-ROUTE','post-ROUTE')" diff --git a/.cursor/skills/inspect-elements/SKILL.md b/.cursor/skills/inspect-elements/SKILL.md index 06ff3919..c1f74a3f 100644 --- a/.cursor/skills/inspect-elements/SKILL.md +++ b/.cursor/skills/inspect-elements/SKILL.md @@ -9,7 +9,7 @@ Use this skill to jump from a concrete DOM node in the running 5chan app to the ## Prerequisites -- Dev server running at `http://5chan.localhost:1355` +- Dev server running at `https://5chan.localhost` - `playwright-cli` installed - Use the local dev app, not production. The element-source helpers are only exposed in dev mode. @@ -33,8 +33,8 @@ The result includes: ## Session setup ```bash -playwright-cli -s=inspect open http://5chan.localhost:1355 -playwright-cli -s=inspect goto http://5chan.localhost:1355/all +playwright-cli -s=inspect open https://5chan.localhost +playwright-cli -s=inspect goto https://5chan.localhost/all playwright-cli -s=inspect eval "window.__ELEMENT_SOURCE__?.ready ?? false" playwright-cli -s=inspect snapshot ``` diff --git a/.cursor/skills/profile-browsing/SKILL.md b/.cursor/skills/profile-browsing/SKILL.md index 3051f6d8..e7047969 100644 --- a/.cursor/skills/profile-browsing/SKILL.md +++ b/.cursor/skills/profile-browsing/SKILL.md @@ -9,7 +9,7 @@ Two-layer profiling: browser-level symptoms (Web Vitals, long tasks, scroll jank ## Prerequisites -- Dev server running at http://5chan.localhost:1355 (`yarn start` via Portless) +- Dev server running at https://5chan.localhost (`yarn start` via Portless) - `playwright-cli` installed (`npm install -g @playwright/cli@latest`) **IMPORTANT:** The orchestrator (you) is responsible for ensuring exactly ONE dev server is running. Profiler subagents must NEVER start a dev server themselves. @@ -31,7 +31,7 @@ Before spawning any profiler subagents, verify exactly one dev server is availab ```bash # Check if the dev server is reachable -curl -sf http://5chan.localhost:1355 -o /dev/null && echo "OK" || echo "NOT RUNNING" +curl -sf https://5chan.localhost -o /dev/null && echo "OK" || echo "NOT RUNNING" ``` - If **OK**: proceed to Step 1. diff --git a/AGENTS.md b/AGENTS.md index 699c6136..e5bc2791 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -182,7 +182,7 @@ src/ ## Local Development URLs -This project uses [Portless](https://github.com/vercel-labs/portless) for local dev. The canonical dev URL is http://5chan.localhost:1355, and non-`master` branches can automatically fall back to a branch-scoped `*.5chan.localhost:1355` route when needed so parallel worktrees do not collide. Other Bitsocial projects use the same proxy (seedit, mintpass, bitsocial at `.localhost:1355`), so they can all run simultaneously without port conflicts. +This project uses [Portless](https://github.com/vercel-labs/portless) for local dev. The canonical dev URL is https://5chan.localhost, and non-`master` branches can automatically fall back to a branch-scoped `*.5chan.localhost` route when needed so parallel worktrees do not collide. Other Bitsocial projects use the same proxy (seedit, mintpass, bitsocial at `.localhost`), so they can all run simultaneously without port conflicts. To bypass Portless: `PORTLESS=0 yarn start` @@ -192,8 +192,8 @@ Android phone over USB (default browser opens via `adb`; `ANDROID_USB_OPEN_BROWS ```bash corepack yarn install -yarn start # http://5chan.localhost:1355 -yarn start:android-usb # Vite + adb reverse for USB Android (http://localhost:1355 on device) +yarn start # https://5chan.localhost +yarn start:android-usb # Vite + adb reverse for USB Android (http://localhost:3000 on device) yarn build yarn test yarn test:coverage diff --git a/README.md b/README.md index 96034835..7193ff0b 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,15 @@ To have your board appear in a directory on the 5chan homepage: 2. Install dependencies: `yarn install` 3. Start the web client: `yarn start` -The dev server normally runs at http://5chan.localhost:1355 via [Portless](https://port1355.dev/), which gives each Bitsocial project a stable, named URL instead of a random port. On non-`master` branches, or when another legacy process is already holding the canonical route, `yarn start` will automatically use a branch-scoped `*.5chan.localhost:1355` URL instead of failing. To bypass Portless and use a plain Vite dev server, run `PORTLESS=0 yarn start`; it will start at `http://5chan.localhost:1355` and automatically fall forward to the next free port if `1355` is already in use. +The dev server normally runs at https://5chan.localhost via [Portless](https://github.com/vercel-labs/portless), which gives each Bitsocial project a stable, named URL instead of a random port. On non-`master` branches, or when another legacy process is already holding the canonical route, `yarn start` will automatically use a branch-scoped `*.5chan.localhost` URL instead of failing. To bypass Portless and use a plain Vite dev server, run `PORTLESS=0 yarn start`; it will start at `http://localhost:3000` and automatically fall forward to the next free port if `3000` is already in use. For device testing on a USB-connected Android phone (without relying on `5chan.localhost` DNS from the device): -- `yarn start:android-usb` starts Vite bound to `127.0.0.1` and runs `adb reverse`, so the phone can load the dev site at `http://localhost:1355`. When the server is up, it opens that URL in each connected device’s default browser via `adb`. Set `ANDROID_USB_OPEN_BROWSER=0` to skip auto-open. Requires [Android platform-tools](https://developer.android.com/tools/releases/platform-tools) (`adb` on your `PATH`), USB debugging enabled, and the device showing as `device` in `adb devices`. +- `yarn start:android-usb` starts Vite bound to `127.0.0.1` and runs `adb reverse`, so the phone can load the dev site at `http://localhost:3000`. When the server is up, it opens that URL in each connected device’s default browser via `adb`. Set `ANDROID_USB_OPEN_BROWSER=0` to skip auto-open. Requires [Android platform-tools](https://developer.android.com/tools/releases/platform-tools) (`adb` on your `PATH`), USB debugging enabled, and the device showing as `device` in `adb devices`. ### Scripts -- **Web client**: `yarn start` (http://5chan.localhost:1355) +- **Web client**: `yarn start` (https://5chan.localhost) - **Web client (Android phone over USB)**: `yarn start:android-usb` (see above) - **Electron client** (must start web client first): `yarn electron` - **Electron client** (don't delete data): `yarn electron:no-delete-data` diff --git a/docs/agent-playbooks/known-surprises.md b/docs/agent-playbooks/known-surprises.md index 07387a83..f79fc48e 100644 --- a/docs/agent-playbooks/known-surprises.md +++ b/docs/agent-playbooks/known-surprises.md @@ -92,10 +92,10 @@ If uncertain, ask the developer before adding an entry. - **Date:** 2026-03-30 - **Observed by:** Codex -- **Context:** Running `PORTLESS=0 yarn start` while another local service already owned port `1355` -- **What was surprising:** The non-Portless dev fallback forced Vite onto `5chan.localhost:1355` with `--strictPort`, so the fallback path could fail immediately even though the main Portless flow is collision-safe. -- **Impact:** Contributors could lose the fallback dev path or interrupt their startup flow when `1355` was already busy. -- **Mitigation:** Keep the fallback behind `scripts/start-dev.js`, which now probes from `1355` upward and starts Vite on the next free port instead of exiting. +- **Context:** Running `PORTLESS=0 yarn start` while another local service already owned port `3000` +- **What was surprising:** The non-Portless dev fallback forced Vite onto `5chan.localhost` with `--strictPort`, so the fallback path could fail immediately even though the main Portless flow is collision-safe. +- **Impact:** Contributors could lose the fallback dev path or interrupt their startup flow when `3000` was already busy. +- **Mitigation:** Keep the fallback behind `scripts/start-dev.js`, which now probes from `3000` upward and starts Vite on the next free port instead of exiting. - **Status:** confirmed ### Fixed Portless app names collide across 5chan worktrees @@ -105,7 +105,7 @@ If uncertain, ask the developer before adding an entry. - **Context:** Starting `yarn start` in one 5chan worktree while another 5chan worktree was already serving through Portless - **What was surprising:** Using the literal Portless app name `5chan` in every worktree makes the route itself collide, even when the backing ports are different, so the second process fails with `"5chan.localhost" is already registered`. - **Impact:** Parallel 5chan branches can block each other even though Portless is meant to let them coexist safely. -- **Mitigation:** Keep Portless startup behind `scripts/start-dev.js`, which now uses a branch-scoped `*.5chan.localhost:1355` route outside the canonical case and automatically increments a `-2`, `-3`, ... suffix when that branch-scoped route is already occupied. +- **Mitigation:** Keep Portless startup behind `scripts/start-dev.js`, which now uses a branch-scoped `*.5chan.localhost` route outside the canonical case and automatically increments a `-2`, `-3`, ... suffix when that branch-scoped route is already occupied. - **Status:** confirmed ### Toolchain model names are not interchangeable diff --git a/docs/agent-runs/pretext-feed-sizing/progress.md b/docs/agent-runs/pretext-feed-sizing/progress.md index 83b34b48..948096d5 100644 --- a/docs/agent-runs/pretext-feed-sizing/progress.md +++ b/docs/agent-runs/pretext-feed-sizing/progress.md @@ -62,7 +62,7 @@ Append one entry per session. - Summary: Tightened the desktop board-feed height model by matching the actual OP body render path more closely. The board estimator now adds the desktop blockquote padding, models the board-view truncated-comment notice, exposes an explicit multiboard board-label height hook for `/all`-style feeds, and applies a small desktop preview-reply calibration instead of treating preview replies like full thread rows. That moved the board benchmark from “measurement-cheaper but visibly off” to near-parity runtime with much lower DOM reads. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/components/post-desktop/post-desktop.tsx`, `src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `src/lib/utils/pretext-height-estimates.ts` - Verification: `corepack yarn type-check`, `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run`, Playwright desktop board benchmark at `http://127.0.0.1:1356/?e2e=pretext-benchmark&surface=board&variant=production&count=800&seed=42&mode=dom` and `mode=item-size`, fresh-route Playwright smoke on `#/all` and `#/biz` -- Blockers: Fresh browser route smoke still cannot validate deep live `/all` content because RPC/cached-feed availability is inconsistent in this environment, and `./scripts/agent-init.sh --smoke` is not yet worktree-aware because it waits for the canonical `http://5chan.localhost:1355` URL instead of the branch-scoped Portless route. +- Blockers: Fresh browser route smoke still cannot validate deep live `/all` content because RPC/cached-feed availability is inconsistent in this environment, and `./scripts/agent-init.sh --smoke` is not yet worktree-aware because it waits for the canonical `https://5chan.localhost` URL instead of the branch-scoped Portless route. - Next: Re-test cached live `/all` and `/biz` against the current branch to confirm the board-feed geometry feels better in real browsing, then decide whether the board path is finally strong enough to merge along with catalog/replies. ## 2026-04-02 17:23 @@ -70,7 +70,7 @@ Append one entry per session. - Item: F002, F004 - Summary: Reprofiled live `/all` with the private Node RPC, found that desktop board cards were still underestimating almost exactly `14px` per preview reply, removed that stale feed-level subtraction, and added a regression test so desktop feed cards now add the preview reply estimates directly. The live result changed materially: a 99-card `/all` sample went from `39.7px` mean absolute error before the fix to `7.1px` after the fix, with the controlled board benchmark regaining a cleaner `item-size` win. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `src/lib/utils/pretext-height-estimates.ts` -- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `corepack yarn test --run`, live Playwright `/all` sampling on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all`, live same-branch A/B on `#/all` vs `#/all?pretextFeed=off`, controlled Playwright board benchmark on `?e2e=pretext-benchmark&surface=board&variant=production&count=800&seed=42&mode=dom` and `mode=item-size` +- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `corepack yarn test --run`, live Playwright `/all` sampling on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all`, live same-branch A/B on `#/all` vs `#/all?pretextFeed=off`, controlled Playwright board benchmark on `?e2e=pretext-benchmark&surface=board&variant=production&count=800&seed=42&mode=dom` and `mode=item-size` - Blockers: Live `/all` now looks much healthier, but the route-level perf delta versus `pretextFeed=off` is still modest/noisy rather than a dramatic blowout, and the master-origin comparison is not trustworthy yet because the master session is not loading the same feed depth as the worktree even after the settings pass. - Next: Do another user-driven real-feed pass on `/all` and `/biz` with the new desktop board fix in place, then decide whether the remaining work should focus on squeezing a larger live-route win or on preparing the branch for merge with the current measurable improvement. @@ -79,7 +79,7 @@ Append one entry per session. - Item: F002, F004 - Summary: Confirmed that the remaining single-board feed glitching was not primarily a bad Pretext formula. Desktop board preview replies were still rendering under `content-visibility:auto` with the `120px` intrinsic placeholder while the feed card itself was relying on Pretext sizing. I disabled deferred layout for board preview replies when the feed estimate path is active, added dev-only preview reply audit attributes on desktop, and reran live `/biz` sampling. That change dropped `/biz` from `52px` mean absolute feed-card error to `6.7px`. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/components/post-desktop/post-desktop.tsx`, `src/components/post-mobile/post-mobile.tsx` -- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `corepack yarn test --run`, live Playwright `/biz` sampling before and after the deferred-layout fix on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/biz` +- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `corepack yarn test --run`, live Playwright `/biz` sampling before and after the deferred-layout fix on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/biz` - Blockers: The branch is now much closer to “merge-ready on real feeds,” but the strongest user-facing proof is still the live geometry/jank sampling plus the deterministic harness rather than a clean master-origin A/B, because the master session is still not consuming the same feed depth reliably. - Next: Do one more human-eye browsing pass on `/all`, `/biz`, and catalog with the current branch. If the route now feels consistently better than production, prepare the branch for merge with the rollback query flags retained. @@ -88,7 +88,7 @@ Append one entry per session. - Item: F002, F004 - Summary: Tracked the mobile `/all` stutter to two separate regressions. First, the Pretext worktree was missing `master` commit `99c0bbfac perf(board): reduce mobile reverse-scroll jank`, so `board.tsx` was still snapshotting Virtuoso state on every `scroll` tick and `comment-media.tsx` was double-running the GIF first-frame hook per card. After porting that, live mobile `/all` audits still showed huge feed-card misses on preview-heavy media posts, so I reprofiled the live cards and found the mobile board preview calibration was stale: cards with five preview replies were underestimating by `+371px` / `+367.9px`. I replaced the old aggressive polynomial calibration with a bounded per-preview-count table, then skipped the full thread-reply estimate hook on board previews and memoized the expensive derived reply maps. That collapsed the live mobile `/all` mean absolute feed-card error from about `135px` to about `18.8px` and pulled the reverse-scroll probe much closer to master. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/components/comment-media/comment-media.tsx`, `src/components/post-desktop/post-desktop.tsx`, `src/components/post-mobile/post-mobile.tsx`, `src/hooks/use-reply-height-estimates.ts`, `src/lib/utils/__tests__/pretext-height-estimates.test.ts`, `src/lib/utils/pretext-height-estimates.ts`, `src/views/board/board.tsx` -- Verification: `corepack yarn type-check`, `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts src/components/__tests__/post-community-address-compat.test.tsx src/views/board/__tests__/board.test.tsx`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), live Playwright mobile `/all` geometry audit on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all`, live mobile reverse-scroll probe on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all`, and matched master control probe on `http://5chan.localhost:1355/#/all` +- Verification: `corepack yarn type-check`, `corepack yarn test --run src/lib/utils/__tests__/pretext-height-estimates.test.ts src/components/__tests__/post-community-address-compat.test.tsx src/views/board/__tests__/board.test.tsx`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), live Playwright mobile `/all` geometry audit on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all`, live mobile reverse-scroll probe on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all`, and matched master control probe on `https://5chan.localhost/#/all` - Blockers: Mobile `/all` is no longer catastrophically wrong, but the worktree still trails the current master control in the dev reverse-scroll probe. Latest matched sample: worktree `seenCount=23`, `scrollHeight=18209`, `maxFrameMs=133.3`, `slowFrames16=11`, `slowFrames32=9`; master `seenCount=23`, `scrollHeight=17735`, `maxFrameMs=108.3`, `slowFrames16=8`, `slowFrames32=6`. - Next: Keep tuning the mobile board path until the reverse-scroll probe and human-eye feel are at least on par with master, likely by profiling rerender/commit churn on mobile `/all` now that the geometry bug is fixed. @@ -97,7 +97,7 @@ Append one entry per session. - Item: F002, F004 - Summary: Found the remaining mobile `/all` board regression in the board-level Virtuoso prop wiring rather than the Pretext formula. In `off` mode the worktree was still rendering ``, which overrides React Virtuoso's internal default DOM measurer. That left mobile multiboard cards stuck on the `defaultItemHeight` fallback (`420px`) instead of reconciling to real DOM sizes, which explained the bad `data-known-size` values, wrong scroll height, and the remaining stutter. I changed board and catalog to only pass `itemSize` when the explicit `item-size` mode is active. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/views/board/board.tsx`, `src/views/catalog/catalog.tsx` -- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/views/board/__tests__/board.test.tsx src/lib/utils/__tests__/pretext-height-estimates.test.ts`, fresh Playwright mobile `/all` load on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all`, and persistent-session Playwright checks on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all` +- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run src/views/board/__tests__/board.test.tsx src/lib/utils/__tests__/pretext-height-estimates.test.ts`, fresh Playwright mobile `/all` load on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all`, and persistent-session Playwright checks on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all` - Blockers: The biggest correctness bug is fixed, but the live mobile `/all` scroll probe in this noisy dev environment is still not a clean proof of parity versus master. The good signal is that board cards now reconcile correctly again: on the persistent RPC-backed session the first mobile `/all` card went from stale `data-known-size=420` before the fix to `data-known-size=413` after the fix, matching the real measured height. - Next: Re-run human-eye A/B on mobile `/all` and `/biz` against master. If the feel issue is gone, the branch is much closer to merge-ready; if not, the remaining work is runtime churn rather than height reconciliation. @@ -106,6 +106,6 @@ Append one entry per session. - Item: F002, F004 - Summary: Re-ran matched live mobile A/B probes against `master` after the Virtuoso prop fix and confirmed the branch is no longer trailing on the board routes that mattered. On the persistent RPC-backed `/all` sessions, the worktree now renders the same visible card heights as `master` while posting slightly better reverse-scroll numbers in the probe (`maxFrameMs 83.3` vs `99.1`, `slowFrames16 6` vs `7`, `slowFrames32 2` vs `3`). On `/biz`, the branch keeps the Pretext path active (`data-pretext-height` nodes present) while matching the same visible card heights and total scroll height as `master`; probe timing is now in the same range instead of the clear regression the user saw earlier. I also added an inline comment in board/catalog so the `itemSize={undefined}` pitfall is documented in code. - Files: `docs/agent-runs/pretext-feed-sizing/feature-list.json`, `src/views/board/board.tsx`, `src/views/catalog/catalog.tsx` -- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run`, matched Playwright mobile A/B on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/all` vs `http://5chan.localhost:1355/#/all`, matched Playwright mobile A/B on `http://codex-feature-pretext-feed-sizing.5chan.localhost:1355/#/biz` vs `http://5chan.localhost:1355/#/biz`, and catalog smoke on both origins at `#/all/catalog` +- Verification: `corepack yarn type-check`, `corepack yarn build`, `corepack yarn lint` (existing warnings only), `corepack yarn doctor` (`86/100`, repo baseline), `corepack yarn test --run`, matched Playwright mobile A/B on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/all` vs `https://5chan.localhost/#/all`, matched Playwright mobile A/B on `https://codex-feature-pretext-feed-sizing.5chan.localhost/#/biz` vs `https://5chan.localhost/#/biz`, and catalog smoke on both origins at `#/all/catalog` - Blockers: None in the implementation itself. Remaining work before merge is review/commit/PR hygiene, plus the follow-up GitHub issue about future custom virtualization once this branch lands. - Next: Prepare the branch for merge, keep `FeedCacheContainer`, and open the deferred “Pretext unlocks custom virtualization” issue only after the Pretext rollout is merged into `master`. diff --git a/electron/main.js b/electron/main.js index 6a0ce0ea..4003d56e 100644 --- a/electron/main.js +++ b/electron/main.js @@ -142,7 +142,7 @@ const createMainWindow = () => { callback({ responseHeaders: details.responseHeaders }); }); - const startURL = isDev ? 'http://5chan.localhost:1355' : `file://${path.join(dirname, '../build/index.html')}`; + const startURL = isDev ? 'http://localhost:3000' : `file://${path.join(dirname, '../build/index.html')}`; mainWindow.loadURL(startURL); diff --git a/package.json b/package.json index 8ac722fa..5baca924 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,8 @@ "analyze-bundle": "cross-env PUBLIC_URL=./ GENERATE_SOURCEMAP=true vite build && npx source-map-explorer 'dist/assets/*.js'", "electron": "corepack yarn build:preload && corepack yarn electron:before && electron .", "electron:no-delete-data": "corepack yarn build:preload && electron .", - "electron:start": "concurrently \"cross-env BROWSER=none corepack yarn start\" \"wait-on http://5chan.localhost:1355 && corepack yarn electron\"", - "electron:start:no-delete-data": "concurrently \"cross-env BROWSER=none corepack yarn start\" \"wait-on http://5chan.localhost:1355 && corepack yarn electron:no-delete-data\"", + "electron:start": "concurrently \"cross-env BROWSER=none PORTLESS=0 PORT=3000 corepack yarn start\" \"wait-on http://localhost:3000 && corepack yarn electron\"", + "electron:start:no-delete-data": "concurrently \"cross-env BROWSER=none PORTLESS=0 PORT=3000 corepack yarn start\" \"wait-on http://localhost:3000 && corepack yarn electron:no-delete-data\"", "electron:rebuild-native": "electron-rebuild -f -o better-sqlite3", "electron:verify-native": "node scripts/verify-electron-native-modules.js", "electron:prepare-package": "corepack yarn electron:rebuild-native && corepack yarn electron:verify-native", @@ -172,7 +172,7 @@ "workbox-window": "7.4.0" }, "optionalDependencies": { - "portless": "0.7.0" + "portless": "0.11.1" }, "resolutions": { "follow-redirects": "1.16.0", diff --git a/public/llms.txt b/public/llms.txt index 3eeea74a..1df30245 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -87,7 +87,7 @@ corepack yarn install yarn start ``` -The normal dev URL is http://5chan.localhost:1355 using Portless. +The normal dev URL is https://5chan.localhost using Portless. To bypass Portless: diff --git a/scripts/AGENTS.md b/scripts/AGENTS.md index adc406cb..0ef41af6 100644 --- a/scripts/AGENTS.md +++ b/scripts/AGENTS.md @@ -4,7 +4,7 @@ These rules apply to `scripts/**`. Follow the repo-root `AGENTS.md` first, then - Keep scripts non-interactive and idempotent. Print the command, URL, branch, or path being acted on so failures are diagnosable. - Use repo-relative paths and environment variables instead of user-specific absolute paths. -- For dev-server helpers, default to `http://5chan.localhost:1355`, but allow a branch-scoped `*.5chan.localhost:1355` route when the launcher is avoiding a Portless name collision. Respect the existing `PORTLESS=0` fallback instead of hard-coding alternate ports. For USB Android preview, `scripts/start-android-usb.mjs` mirrors bitsocial-web: `adb reverse` plus Vite on `127.0.0.1`, then `am start` VIEW to open the default browser when the port is listening (disable with `ANDROID_USB_OPEN_BROWSER=0`). +- For dev-server helpers, default to `https://5chan.localhost`, but allow a branch-scoped `*.5chan.localhost` route when the launcher is avoiding a Portless name collision. Respect the existing `PORTLESS=0` fallback instead of hard-coding alternate ports. For USB Android preview, `scripts/start-android-usb.mjs` mirrors bitsocial-web: `adb reverse` plus Vite on `127.0.0.1`, then `am start` VIEW to open the default browser when the port is listening (disable with `ANDROID_USB_OPEN_BROWSER=0`). - Keep shell helpers thin. When logic becomes stateful or cross-platform, prefer a Node script. - Git and worktree helpers must validate input and default to safe operations. - If a helper deletes local branches automatically, document the exact eligibility checks and keep the behavior conservative. diff --git a/scripts/agent-init.sh b/scripts/agent-init.sh index 9d0b4ba2..b974c0ee 100755 --- a/scripts/agent-init.sh +++ b/scripts/agent-init.sh @@ -7,7 +7,7 @@ wait_timeout="${AGENT_INIT_TIMEOUT_SECONDS:-60}" get_default_app_url() { if [ "${PORTLESS:-}" = "0" ]; then - echo "http://5chan.localhost:1355" + echo "http://localhost:3000" return fi @@ -23,12 +23,12 @@ get_default_app_url() { )" if [ -n "$branch_label" ]; then - echo "http://${branch_label}.5chan.localhost:1355" + echo "https://${branch_label}.5chan.localhost" return fi fi - echo "http://5chan.localhost:1355" + echo "https://5chan.localhost" } app_url="${AGENT_APP_URL:-$(get_default_app_url)}" @@ -55,7 +55,7 @@ mkdir -p "$log_dir" cd "$repo_root" is_server_up() { - curl -fsS "$app_url" >/dev/null 2>&1 + curl -fsSk "$app_url" >/dev/null 2>&1 } wait_for_server() { diff --git a/scripts/start-android-usb.mjs b/scripts/start-android-usb.mjs index c62c8b82..19cc66f8 100644 --- a/scripts/start-android-usb.mjs +++ b/scripts/start-android-usb.mjs @@ -6,7 +6,7 @@ import { isWindows, repoRoot, resolvePort, startVite, waitForPort } from './dev- const adbBin = isWindows ? 'adb.exe' : 'adb'; const host = '127.0.0.1'; -const requestedPort = Number(process.env.ANDROID_USB_PORT || 1355); +const requestedPort = Number(process.env.ANDROID_USB_PORT || 3000); const openBrowser = process.env.ANDROID_USB_OPEN_BROWSER !== '0' && process.env.ANDROID_USB_OPEN_BROWSER !== 'false'; function fail(message) { diff --git a/scripts/start-dev.js b/scripts/start-dev.js index 0ade43fb..5faf697a 100644 --- a/scripts/start-dev.js +++ b/scripts/start-dev.js @@ -1,7 +1,8 @@ import { existsSync } from 'node:fs'; import { join } from 'node:path'; import { spawn, spawnSync } from 'node:child_process'; -import { get } from 'node:http'; +import { get as httpGet } from 'node:http'; +import { get as httpsGet } from 'node:https'; import { resolvePort } from './dev-server-utils.mjs'; const isWindows = process.platform === 'win32'; @@ -11,8 +12,8 @@ const executableSuffix = isWindows ? '.cmd' : ''; const portlessBin = join(binDir, `portless${executableSuffix}`); const viteBin = join(binDir, `vite${executableSuffix}`); const fallbackHost = '127.0.0.1'; -const fallbackUrlHost = '5chan.localhost'; -const fallbackRequestedPort = 1355; +const fallbackUrlHost = 'localhost'; +const fallbackRequestedPort = Number(process.env.PORT) || 3000; function sanitizeLabel(value) { return value @@ -37,7 +38,7 @@ function getCurrentBranch() { return branch || null; } -function getActivePortlessRoutes() { +function getActivePortlessRouteHosts() { const result = spawnSync(portlessBin, ['list'], { cwd: process.cwd(), encoding: 'utf8', @@ -48,16 +49,16 @@ function getActivePortlessRoutes() { return new Set(); } - const matches = result.stdout.match(/http:\/\/[a-z0-9.-]+\.localhost:1355/g) || []; + const matches = result.stdout.match(/https?:\/\/[a-z0-9.-]+\.localhost(?::\d+)?/g) || []; - return new Set(matches); + return new Set(matches.map((url) => new URL(url).hostname)); } -function isRouteBusy(activeRoutes, appName) { - return activeRoutes.has(`http://${appName}.localhost:1355`); +function isRouteBusy(activeRouteHosts, appName) { + return activeRouteHosts.has(`${appName}.localhost`); } -function getPreferredPortlessAppName(activeRoutes) { +function getPreferredPortlessAppName(activeRouteHosts) { const branch = getCurrentBranch(); const branchLabel = sanitizeLabel(branch || 'current'); @@ -65,7 +66,7 @@ function getPreferredPortlessAppName(activeRoutes) { return `${branchLabel}.5chan`; } - if (isRouteBusy(activeRoutes, '5chan')) { + if (isRouteBusy(activeRouteHosts, '5chan')) { return `${branchLabel}.5chan`; } @@ -73,17 +74,17 @@ function getPreferredPortlessAppName(activeRoutes) { } function getPortlessAppName() { - const activeRoutes = getActivePortlessRoutes(); - const preferredAppName = getPreferredPortlessAppName(activeRoutes); + const activeRouteHosts = getActivePortlessRouteHosts(); + const preferredAppName = getPreferredPortlessAppName(activeRouteHosts); - if (!isRouteBusy(activeRoutes, preferredAppName)) { + if (!isRouteBusy(activeRouteHosts, preferredAppName)) { return preferredAppName; } for (let suffix = 2; suffix < 1000; suffix += 1) { const candidate = `${preferredAppName}-${suffix}`; - if (!isRouteBusy(activeRoutes, candidate)) { + if (!isRouteBusy(activeRouteHosts, candidate)) { return candidate; } } @@ -98,7 +99,7 @@ let publicUrl = null; if (command === portlessBin) { const appName = getPortlessAppName(); - publicUrl = `http://${appName}.localhost:1355`; + publicUrl = `https://${appName}.localhost`; args = [appName, 'vite']; if (appName !== '5chan') { @@ -127,7 +128,7 @@ const child = spawn(command, args, { }); if (publicUrl && process.env.BROWSER !== 'none') { - waitForHttpReady(publicUrl, 30_000) + waitForUrlReady(publicUrl, 30_000) .then(() => { console.log(`Opening ${publicUrl} in browser...`); openInBrowser(publicUrl); @@ -146,16 +147,19 @@ child.on('exit', (code, signal) => { process.exit(code ?? 0); }); -async function waitForHttpReady(url, timeoutMs) { +async function waitForUrlReady(url, timeoutMs) { const startedAt = Date.now(); while (Date.now() - startedAt < timeoutMs) { const ready = await new Promise((resolve) => { - const request = get(url, (response) => { + const parsedUrl = new URL(url); + const getUrl = parsedUrl.protocol === 'https:' ? httpsGet : httpGet; + const onResponse = (response) => { response.resume(); const statusCode = response.statusCode ?? 500; resolve(statusCode >= 200 && statusCode < 400); - }); + }; + const request = parsedUrl.protocol === 'https:' ? getUrl(parsedUrl, { rejectUnauthorized: false }, onResponse) : getUrl(parsedUrl, onResponse); request.on('error', () => resolve(false)); request.setTimeout(2_000, () => { @@ -176,9 +180,11 @@ async function waitForHttpReady(url, timeoutMs) { function openInBrowser(url) { const opener = - process.platform === 'darwin' ? { cmd: 'open', args: [url] } - : process.platform === 'win32' ? { cmd: 'cmd', args: ['/c', 'start', '""', url] } - : { cmd: 'xdg-open', args: [url] }; + process.platform === 'darwin' + ? { cmd: 'open', args: [url] } + : process.platform === 'win32' + ? { cmd: 'cmd', args: ['/c', 'start', '""', url] } + : { cmd: 'xdg-open', args: [url] }; spawn(opener.cmd, opener.args, { stdio: 'ignore', detached: true }).unref(); } diff --git a/yarn.lock b/yarn.lock index 6deaa373..00304a94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,7 +69,7 @@ __metadata: oxfmt: "npm:0.20.0" oxlint: "npm:1.35.0" playwright: "npm:1.56.1" - portless: "npm:0.7.0" + portless: "npm:0.11.1" progress: "npm:2.0.3" react: "npm:19.1.2" react-ace: "npm:14.0.1" @@ -16077,11 +16077,9 @@ __metadata: languageName: node linkType: hard -"portless@npm:0.7.0": - version: 0.7.0 - resolution: "portless@npm:0.7.0" - dependencies: - chalk: "npm:^5.3.0" +"portless@npm:0.11.1": + version: 0.11.1 + resolution: "portless@npm:0.11.1" bin: portless: dist/cli.js conditions: (os=darwin | os=linux | os=win32)