Skip to content

fix(windows): the app page loads, and the installer replaces a copy that cannot start - #356

Merged
devswha merged 4 commits into
mainfrom
fix/windows-install
Oct 2, 2026
Merged

devswha merged 4 commits into
mainfrom
fix/windows-install

Conversation

@devswha

@devswha devswha commented Oct 2, 2026

Copy link
Copy Markdown
Owner

What happened

Found by installing on a real Windows 11 PC through the README command (#330 is unreleased on main).

  1. The app page never loads on Windows. Every URL answers herdr-web-ui server is running, but the browser client has not been built yet, although dist\index.html is there. /api/health is fine, so the install looks healthy.
  2. The README command installs a copy that cannot start. It picks the latest release, v0.3.43, which has no Windows support. herdr skips all of its build commands on Windows and reports success. Running the installer again says already installed and then fails with plugin_action_not_found. That copy stays broken after the next release too, because nothing updates it.
  3. herdr's own installer sometimes stops without any message on a PC with banking security software (9 of 16 runs here, plus 10 of 10 later). The installer then said Fix the error above with no error above.

Cause

  1. server/static.ts built DIST_DIR from new URL("../dist", import.meta.url).pathname. On Windows that is /C:/Users/.... The same line breaks Linux and macOS when the checkout path has a space or a non-ASCII character, since the pathname is percent-encoded. The Windows test asserted only status === 200, which the not-built notice also returns.
  2. install.ps1 treated any listed plugin as installed and never looked at whether it has the Windows launcher.

Change

  • server/static.ts: join(import.meta.dir, "..", "dist"), as the rest of the server does.
  • scripts/windows-plugin.test.ts: the root page must contain the app shell.
  • install.ps1:
    • an installed copy without scripts\plugin.ps1 is uninstalled and installed again;
    • a release that still has no Windows launcher after installing stops with does not support Windows yet instead of a false success;
    • a herdr installer that does not finish gets a message that says what to do.
  • scripts/windows-install.test.ps1: both new cases, on a real temporary plugin directory.

Validation

  • Linux, a checkout under /tmp/ulw qa space/: main answers GET / with the not-built notice, this branch with <!doctype html> and the root div.
  • Windows 11 PC, PowerShell 5.1: scripts/windows-install.test.ps1 passes with the new cases (TEST_EXIT=0).
  • Windows 11 PC, real install: see the comment below once it has run from this branch.
  • bun run typecheck passes.

Not checked: whether a PowerShell window flashes on start (no desktop over SSH). The silent stop of herdr's installer is not fixed here; calling it from PowerShell or in-process made no difference.

…paces

DIST_DIR came from a URL's pathname, which is /C:/... on Windows and percent-encoded for a space or a non-ASCII character. The server then answered every page with the not-built notice. The Windows test checked only the status, which that notice shares.
…en a release cannot run there

herdr installs a release without Windows build steps as a success: nothing is built and no Windows action exists. A rerun then said already installed and failed with plugin_action_not_found. The installer now replaces such a copy, refuses a release without the Windows launcher, and explains a herdr installer that stops without a message.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
CONTRIBUTING.md — configured

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3cc23352-2e4d-4f34-ba15-09381bdd9360

📥 Commits

Reviewing files that changed from the base of the PR and between 3110a68 and 62cf4ba.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • install.ps1
  • scripts/windows-install.test.ps1
  • scripts/windows-plugin.test.ts
  • server/static.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Fixed Windows app page loading from installation paths containing spaces or non-ASCII characters.
    • The installer now replaces releases without Windows support and reports when an installation fails or the release cannot run on Windows.

Walkthrough

The Windows installer now handles installer failures, replaces installed plugins without a Windows launcher, and checks newly installed releases for Windows support. Static file serving builds the distribution path with import.meta.dir and join.

Changes

Windows compatibility

Layer / File(s) Summary
Windows plugin installation checks
install.ps1, scripts/windows-install.test.ps1, CHANGELOG.md
The installer reports a recovery message when the herdr installer fails. It replaces an installed plugin without scripts\plugin.ps1 and rejects a newly installed release without that file. Tests cover unsupported and supported releases and a plugin path containing spaces. The changelog records these fixes.
Static distribution path and page assertion
server/static.ts, scripts/windows-plugin.test.ts
The distribution path now uses import.meta.dir and join. The root-page test checks for the root mount element in the response body.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: jjliebig, haeminway1

Merge Risk: ⚪ Minimal · up to 62cf4

This change fixes serving the app page on Windows and from paths with spaces or non-ASCII characters. It also makes the installer replace or reject plugin releases that lack Windows support. No merge-blocking issues were found.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 62cf4

The restored app page keeps the existing authentication boundary. Automatic replacement targets the same installed plugin, but preservation of existing configuration and recovery from interrupted replacement are not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The source-visible replacement scope is one fixed plugin identity in the invoked herdr context. The static-path correction restores access to the intended browser bundle, without evidence of additional service authority or broader filesystem exposure.

Trust Boundaries and Controls

  • observed — Attacker-controlled request paths still pass through the existing static normalization and candidate checks. Protected routes remain gated separately. These controls predate the PR and are unchanged; the directory fix does not remove them.
  • observed — The Windows-launcher check establishes installation eligibility, not package authenticity or successful runtime health. Native-command failures stop the script, while startup readiness is checked separately after invoking the installed action.

Resilience and Maintainability Implications

  • observed — Failure containment prevents startup after a failed installation or missing launcher. It does not restore the removed copy or establish preservation of authentication configuration: the test's uninstall mock only changes installation state and an uninstall counter.

Hardening Proposals

  • proposed — Establish and verify the host's configuration-preservation contract for replacement, including token-bearing files and interrupted or concurrent runs. Where supported, obtain and validate the replacement before removing the existing copy.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two main changes: fixing Windows app-page loading and replacing an installed copy that cannot start.
Description check ✅ Passed The description explains the problem, causes, changes, validation results, and known limitations. It uses alternative headings instead of the template's exact "## Change" heading and does not include …
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@devswha
devswha merged commit 40505f3 into main Oct 2, 2026
12 checks passed
@devswha
devswha deleted the fix/windows-install branch October 2, 2026 19:46
@devswha

devswha commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

Real run on the Windows 11 PC from this branch (8abac97), before the merge:

  • A copy installed with herdr plugin install devswha/herdr-web-ui --ref v0.3.43 --yes (no scripts\plugin.ps1, no dist, head 1608cce), then install.ps1 from this branch with HERDR_WEB_UI_REF=fix/windows-install: the copy was replaced, built and started, ending with running http://127.0.0.1:7317. Head afterwards 8abac97, working tree clean.
  • GET http://127.0.0.1:7317/: status 200, 2371 bytes, contains <div id="root". /sw.js: 200 text/javascript.
  • Headless Chrome through an SSH tunnel: the terminal lens shows the PowerShell prompt, a typed echo mirror-ok-$(40+2) printed mirror-ok-42 in 225 ms, the screen survives a lens switch, and a 390 px wide page shows it too. No page errors.
  • The same installer without a ref, so the latest release v0.3.43: herdr web ui v0.3.43 does not support Windows yet. Run this again after the next release. Nothing was left listening.

The README command therefore gives that message until the next release, instead of a copy that looks installed and cannot start.

devswha added a commit that referenced this pull request Oct 3, 2026
Bumps package.json and herdr-plugin.toml to 0.3.44, moves the Unreleased
notes under [0.3.44] - 2026-10-03, adds the compare link, and removes a
merge marker line left in CHANGELOG.md by #351's conflict resolution.
### Added
- Native Windows x64 installation through `install.ps1`, with the same
herdr plugin startup
and updates. Windows needs Bun and Git, without Node or WSL, and keeps
using the terminal
screen mirror. ([#330](#330)
by @JJLiebig)
- Settings can choose Chat, Terminal, or Auto as the default view for
panes. Changing it resets
remembered pane views on this device. Shell panes still open in
Terminal.
([#325](#325) by
@Haeminway1)
- Choose the terminal input line or direct typing on desktop as well as
touch screens, and
customize or unbind the app's Mod+Shift shortcuts with conflict checks
and reset.
  ([#334](#334))

### Changed
- In the sidebar's By workspace view, a workspace with one pane keeps
its numbered header and
can be folded, renamed and reordered from that header, just like a
workspace with several panes.
  ([#332](#332) by @beomq)
- The top usage panel shows larger percentages, remaining-capacity
colors and compact reset
countdowns with their local time. Expired reset times stay hidden until
fresh usage arrives.
([#336](#336) by
@Haeminway1)
- Pane titles that contain a directory show its last folder, and
matching workspace and folder
names appear once in the sidebar and command palette, including Windows
paths.
([#337](#337) by
@Haeminway1)
- In the sidebar's By workspace view, a pane row no longer repeats the
workspace its header names.
Its second line shows the folder only when neither the title nor the
workspace already says it.
  ([#358](#358))

### Fixed
- GJC conversations are resolved from the foreground process directory
when it differs from
the pane directory.
([#333](#333) by @Kinetic27)
- Direct terminal input preserves rapid IME commits when punctuation
arrives before composition
timers run, with a bounded xterm 5.5 backport and Korean final-consonant
regression checks.
Native Android/Gboard checks also fixed stale editor text after
Backspace breaking the next
Hangul word. Secret entry now refuses a held or unready attachment and
failed PTY writes.
  ([#334](#334))
- New session in the browser demo opens the new session instead of
leaving a blank page.
  ([#355](#355))
- Terminal input keeps multi-character IME commits and emoji while
disconnected, waits for the
attachment before sending keys, and reports input failures. Unsent input
lines survive pane,
lens and mode changes; late acknowledgements preserve replacement edits.
Composition keeps
its Enter and Send button, and terminal key-bar taps wait until it
finishes.
  ([#334](#334))
- The background tasks list stays below the app header on a short
screen, such as a phone held
  sideways, and scrolls inside the room above the message box.
  ([#354](#354))
- The mobile message box sits closer to the home indicator while
retaining its base spacing.
([#335](#335) by
@Haeminway1)
- Adding or reconnecting a remote PC says when herdr is not running or
not answering there,
  instead of only `Bridge verification failed (500)`.
  ([#353](#353))
- Shift+Enter in the live terminal sends the same newline chord as
Alt+Enter, instead of plain
Enter that submits an agent's message. Pending IME text is sent before
the newline chord.
([#339](#339) by
@WOULDU-pres)
- On Windows, and from an install path with a space or a non-ASCII
character, the app page loads
instead of the "not built yet" notice. The Windows installer replaces a
copy from a release
  without Windows support, and says so when a release cannot run there.
  ([#356](#356))
- On an iPhone home screen app, a text field that keeps its focus with
the keyboard down no
  longer leaves a status-bar band under the message box.
([#349](#349) by
@Haeminway1)
- After `/new` in an OmO pane, the chat stops showing the conversation
before it: OmO writes the
new session's file only with its first message, and until then the chat
shows what a fresh OmO
shows. ([#351](#351) by
@WOULDU-pres)
- On a Windows PC, an omo pane shows omo's mark instead of Claude's, and
its chat finds the
conversation: process words with `bun.exe`, backslashes and a drive
letter read as omo, and the
  session folder is named as omo's engine names a Windows folder.
([#342](#342) by
@Haeminway1)
- The chat lens finds an omo pane's conversation when its process keeps
its sessions outside
`~/.omo/agent` (`OMO_CODING_AGENT_DIR`, `SENPI_CODING_AGENT_DIR` or
`PI_CODING_AGENT_DIR`).
([#350](#350) by
@Haeminway1) passes. After the merge: .
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.

1 participant