Repository navigation
Conversation
…olliding worktree dirs, keep cwd-less sessions grouped, drop dead last-open-session tracking - upsertProject carries alias/sortOrder/pinOrder over on re-add (like launchConfig) and POST /api/projects returns them. - addWorktree keeps the existing sanitized dir name but appends a short branch hash on collision, so a/b and a-b get distinct dirs; a distinct error is raised only when even the hash-suffixed dir is taken. - workspaceKeyOf treats empty strings as missing; groupSessionsByProject keeps key-less sessions in an unknown-workspace bucket instead of dropping them. - Last-open-session-per-project was recorded but never read and project activation is deliberately session-free, so the dead helpers and their sidebar call sites are removed.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review Roast 🔥Verdict: No Issues Found | Recommendation: Merge Oh wait, this PR is actually clean. I need to sit down. I had my flamethrower warmed up and everything. 📊 Overall: Like finding a unicorn in production — I didn't think clean PRs existed anymore, but here we are. Files Reviewed (10 files)
Reviewed by free · Input: 102.4K · Output: 10.8K · Cached: 182.1K |
|
The Bun server/daemon architecture has landed on |
andrebrait
left a comment
There was a problem hiding this comment.
Thank you for the project-registry and worktree fixes. Maintainer triage at 20af76d7a0245cb363242be4d81af5903c334f40: the re-add metadata loss and sanitized-branch directory collision still apply to main. Scratch probes with these hunks ported onto main confirmed that a/b and a-b can receive distinct directories while re-adding the same branch still errors.
Please rebase the project route, SessionSidebar, project-ordering and worktree changes. Keep main's newer symlink guard around the worktree base directory and its daemon-owned project API. The route response hunk must move to the host operation, or be dropped if the client reload already supplies the metadata.
Two concrete follow-ups: preserving a hidden project's pinOrder can collide with another visible project pinned in the meantime (the probe produced two pinOrder:0 entries), so reconcile the order when restoring it. Also, the new empty-workspace bucket has no rendering consumer; either connect it to a visible row or remove that ineffective hunk. The unused last-open-session cleanup is not needed to fix either core bug.
No CI, build, real-browser run or full suite was performed locally. This is triage, not merge approval.
Port the selected upstream changes onto main 51d3c19 while retaining its Bun server, shared host ownership, durable outbox, and default transcript. Correct integration and Windows compatibility defects exposed by runtime verification; do not import failing-check PRs or deferred folder uploads. Reviewed source heads: ompweb-dev#296 7df8767 ompweb-dev#296 ompweb-dev#297 20af76d ompweb-dev#297 ompweb-dev#298 cdae97a ompweb-dev#298 ompweb-dev#303 588ffbd ompweb-dev#303 ompweb-dev#309 ec97f9e ompweb-dev#309 ompweb-dev#320 7bf8948 ompweb-dev#320 ompweb-dev#321 550d302 ompweb-dev#321 ompweb-dev#334 46dabb4 ompweb-dev#334 ompweb-dev#335 8edc916 ompweb-dev#335 ompweb-dev#338 72fc0a3 ompweb-dev#338 ompweb-dev#340 ea67136 ompweb-dev#340 ompweb-dev#343 645044d ompweb-dev#343 ompweb-dev#349 ed5e053 ompweb-dev#349 ompweb-dev#374 38f93f3 ompweb-dev#374 ompweb-dev#407 20600a7 ompweb-dev#407 ompweb-dev#410 3c210ff ompweb-dev#410 ompweb-dev#411 a99f8bb ompweb-dev#411 ompweb-dev#414 34a33d7 ompweb-dev#414 ompweb-dev#416 55b7ef8 ompweb-dev#416 ompweb-dev#419 d89aa5a ompweb-dev#419 Co-authored-by: kahme247 <61059522+kahme247@users.noreply.github.com> Co-authored-by: Tanger <49036591+GTanger@users.noreply.github.com> Co-authored-by: lutfi-zain <147457356+lutfi-zain@users.noreply.github.com> Co-authored-by: OrwellVII <56531592+OrwellVII@users.noreply.github.com> Co-authored-by: pengshuai <pengshuai4@lenovo.com> Co-authored-by: todouu <pslzj@outlook.com> Co-authored-by: tianzishen <tianzishen@local> Co-authored-by: killcerr <kill_cerr@outlook.com> Co-authored-by: tianzishen <tianzishen@sensetime.com> Co-authored-by: RoyaLemonade <37620553+RoyaLemonade@users.noreply.github.com>
|
Hi @kahme247, thank you for your contribution, and apologies for the long wait on this PR. We really appreciate the time and effort you have put into it. We are working through a major refactor of ompweb, including switching to our own build of omp. We are close to finishing that work; once the refactor is complete, we will turn our attention back to the pending PRs, including this one. Thank you for your patience and for helping improve ompweb! |
|
Hi, thanks for this PR. It currently conflicts with main and can't be merged as-is — please rebase it onto current main and resolve the conflicts. Once it's rebased I'll re-run the checks. Beyond the rebase, this still needs the pin-order collision reconciliation and a decision on the unknown-workspace bucket (wire it up or drop it). The core fixes (project re-add wipe, worktree |
|
Closing this as superseded by maintainer rework #554, which rebases the core fixes onto current main (project re-add wipe, worktree |
…collision (rework of ompweb-dev#297)
…11-23 fix(modules): round-1 bug-hunt fixes — project re-add wipe, worktree collision (rework of ompweb-dev#297)
* fix(windows): let in-app updates replace an npm-global install Port of ompweb-dev/ompweb#519. * fix(windows): stop a failed host candidate that got the old daemon's pid Port of ompweb-dev/ompweb#526. * fix(outbox): prune delivered rows inside the add's write transaction Port of ompweb-dev/ompweb#535. * fix(windows): find the host's scheduled task without administrator rights Port of ompweb-dev/ompweb#539. * fix(updates): build the tray at release and resume host update downloads Port of ompweb-dev/ompweb#532. The committed bin/tau-tray.exe was still the omp-web build; releases now build it from native/tray. The omp runner download resume does not apply: tau has no runner download. * fix(hosts): report pi to the server once it answers after the daemon started Port of ompweb-dev/ompweb#542. A daemon whose startup read found no pi reads the version again (30 s, doubling to 5 min) and sends a pi_version link message, so a host that gets pi after its daemon started comes online without a restart. The runner download retry does not apply: tau has no runner download. * docs(agents): note the pi_version link message * fix(chat): count only completed subagents in the subagents header Port of ompweb-dev/ompweb#440. * feat(chat): render svg code fences inline Port of ompweb-dev/ompweb#455. * fix(sidebar): mark a completed session seen once it is opened Port of ompweb-dev/ompweb#336. * fix(i18n): add the zh-TW completed-subagents summary Port of ompweb-dev/ompweb#545. * perf(sessions): strip unused assistant fields from the session response Port of ompweb-dev/ompweb#454. * feat(api): app-info handshake and a per-connection heartbeat Port of ompweb-dev/ompweb#407. * feat(directory-picker): add a Browse… button that opens the OS folder dialog Port of ompweb-dev/ompweb#544. * feat(sessions): navigation-only reads, context ETag and a prompt-less state Port of ompweb-dev/ompweb#415. A rename now falls back to pi's session_info entry only when pi refused it or the child is gone. * feat(notifications): answer a pending dialog from the notification Port of ompweb-dev/ompweb#414, without omp's formDialog and session-move aliases. * perf(events): hold tool snapshots to one frame per second Port of ompweb-dev/ompweb#418. * fix(ui): prevent file-panel tabs from clipping on overflow Port of ompweb-dev/ompweb#547. * fix(projects): keep a re-added workspace's display data and avoid worktree path collisions Port of ompweb-dev/ompweb#554 (rework of ompweb-dev/ompweb#297). * feat(composer): fullscreen edit mode and one-line collapse for long sent messages Port of ompweb-dev/ompweb#556. * docs(changelog): note the ports from ompweb * chore: use tau names in the ported update and tray code * fix(markdown): sanitize svg fences with an element allowlist A tab inside the scheme (java	script:), a prefixed xlink href, <set>/<animate> retargeting an href, and CDATA or processing instructions re-parsed as HTML on insertion all got past the blocklist sanitizer. * fix(directory-picker): offer the folder dialog only to a page on this machine Behind a reverse proxy on this machine every connection is loopback, so the page's own Origin (or same-origin Referer) must be loopback too. The picker can be closed while a dialog is pending, and the zenity check runs once. * fix(composer): queue or steer from the full-screen editor during a run Send and Ctrl+Enter called handleSend, which ignores a message while a run streams, so the editor closed and nothing was sent. * fix(notifications): keep a shared child's dialogs announceable after this server leaves it Leaving a host-owned child that keeps running retracted its pending dialogs permanently, so the next holder could not announce a question that was still waiting. They are now forgotten (a temporary retraction), as after a resync. * docs(notifications): drop omp-only dialog kinds from the ported comments * fix(dialogs): answer pi's dialogs under their own ids and show the ask tool's questions The wrapper still accepted only omp's numeric dialog ids, so every answer to a pi dialog (UUID ids) failed with invalid_ui_response, from the web dialog and from a notification. The ask tool's payload ({questions: [{question, options: string[], multiSelect}]}) reached the dialog unconverted, which expects a question list with option objects; RpcProcess now converts it. * fix(tray): read tau's settings and logs from ~/.pi/agent The native tray still read ~/.omp/agent/web-service.json and its logs, so it ignored the saved port, hostname and mode. Releases now build this source (scripts/build-tray.sh). * fix(hosts): never build the local link URL from an unbracketed IPv6 address * test(notifications): name the registry-key answer test for what it checks * test(hosts): give the fake children pi's string dialog ids * fix(dialogs): keep host tool calls out of dialog answers, and settle a dead child's dialogs for good A ui_response naming a pending host tool call is refused, so its bookkeeping sees the real host_tool_result. Dialogs are only forgotten when this server leaves a shared child that is still alive. The ask tool's questions get distinct ids, and pageIsLoopback sits above handle's doc comment. * fix(events): stop releasing held tool snapshots once the sink falls behind * fix(composer): paste images and leave IME keys alone in the full-screen editor * fix(directory-picker): require Origin on a non-GET, and read the Windows chooser's path as UTF-8 * fix(worktrees): report an occupied fallback worktree directory as worktree_directory_exists * fix(notifications): keep pushes within 3993 bytes, refuse expired dialogs and settled replays * fix(updates): release only the stopped server's own processes and recheck each pid before stopping it * docs(notifications): name the /api/events notifications channel * fix(updates): release every install locker after the server stops again Scoping that release to the stopped trees missed their children on Linux and macOS, where a dead parent's children are re-parented, so the leftover check refused the update. * fix(notifications): keep the question in a push that drops its dialog, and close expired dialogs in open tabs * fix(updates): skip a locker whose re-listing fails; document the notifications subscribe body * fix(updates): fail the install cleanup when a re-listing fails Skipping the locker let rollback take an unfinished cleanup as done and restore the installation while a runtime still ran from it. * fix(notifications): do not carry a request id past the dialog id limit pi's ids are UUIDs; an oversized one could take the push past 3993 bytes on its own.
Found by the round-1 bug-hunt fleet (area: modules and chats), all reproduced before fixing.
Tests: targeted suites 35 pass, 0 fail, 1 pre-existing skip (win32-only casing test on Linux); tsc clean; eslint 0 errors. Parent re-verified: same targeted suites, tsc, and eslint on the pushed commit.
Honest limitation: the grouping fix keeps a fully cwd-less session from being dropped, but the sidebar renders rows only for known projects, so such a session still has no clickable sidebar row (direct-URL open works). Full visibility would need a synthetic "Unknown workspace" row with label/activation/remove semantics — follow-up, not half-built here. The agent.db sidecar bug from this area is fixed in the security PR, not here.