Repository navigation
fix(chat): omo에서 /new 후 이전 대화가 남아 보이는 문제 수정 - #351
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 SummarySummary by CodeRabbit
Walkthrough
ChangesOmO transcript selection
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The reviewed Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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: .
## Change An OmO pane that has not been sent a message yet opens its chat on "Conversation unavailable — show terminal output". That happens on every new OmO pane and after every `/new`, so a working pane looks broken until the first message. OmO publishes its holder record (`session-holders/<id>/<pid>.json`) as soon as it starts or runs `/new`. It writes the session file (`*.jsonl`) only with the first message. In the session that found this, the holder appeared at 15:45:41 and the file at 15:46:12, when the first message was sent. During that gap no file names the held session, so `/api/pane/conversation` answered `scrollback` and the chat showed the terminal fallback. #351 already stops the chat from showing the conversation from before `/new`. It left this state as the fresh-OmO fallback and asked which state the chat should show. This PR proposes an answer: an empty OmO chat. - `server/omo.ts`: when the one session a pane's OmO process holds has no file in the store yet, `omoSessionForPane` reports it as `pending`. It builds on #351's `heldRuntime`. The check reads the store's file names directly, so the bounded candidate list cannot mistake an existing file for a missing one. `omoTranscriptForPane` keeps its signature. - `server/conversation.ts`: for such a pane, `paneConversation` returns an empty `omo-transcript` (`turns: []`, `cursor: null`, `history_id: "unwritten:<session id>"`) instead of throwing `ConversationUnavailable`. The chat then shows its existing "No conversation yet — say something below" state. The first message writes the file, the `history_id` changes, and the chat loads that conversation. Image and tool-output lookups still treat the pane as having no transcript. - `CHANGELOG.md`: entry under `[Unreleased]` → `### Fixed`. ## Validation macOS (Apple silicon), herdr 0.9.3, Bun 1.4.2, omo-ai with the senpi engine. - **Real OmO, no message sent:** ran OmO in an owned, temporary workspace and queried both servers before any message. - Release v0.3.43: `{"source":"scrollback","turns":[]}` - This branch: `{"source":"omo-transcript","turns":[],"metadata":{"model":null,"reasoning_effort":null},"cursor":null,"history_id":"unwritten:01a0fe94-…"}` - An existing OmO pane whose session was already written read the same on this branch. - **Screenshots:** same pane, English UI, sidebar cropped out. | Before (v0.3.43) | After | | --- | --- | |  |  | - **Contract tests** in `server/omo.contract.test.ts`: - `tells a held session omo has not written yet from an older one`: a fresh pane, a pane whose launch `--session-id` names an older session (as after `/new`), a file whose name only contains the held id, and the pane resolving to its file once it is written. - `serves a held omo session as an empty conversation until its file is written`: over HTTP (`createServer`), the empty `omo-transcript` with `history_id: "unwritten:<id>"`, 409 for a stale `before` cursor, then the written transcript with a new `history_id`. - Both pass. Each fails when its check is reverted (`pending` disabled, the old `includes` name match, the `before` 409 removed). - `bun run generate:types --check`, `bun run typecheck`, `bun run build`: pass. - `bun run test:unit`: 1057 passed, 4 skipped, 1 failed. The failure is `server/pi.test.ts` "accepts a session file inside the store", which also fails on `upstream/main` on macOS (`/var` vs `/private/var` tmpdir). - `server/omo.contract.test.ts` on macOS, run with `TMPDIR=$(realpath $TMPDIR)`: 6 passed. Two tests fail the same way on `upstream/main` because they read `/proc`. ### Not verified - **First message with real OmO:** the switch from the empty chat to the real conversation after the first message was not run end to end, since it needs a model call. The contract test covers the file selection, and the `history_id` change uses the chat's existing reset path. - **Screenshot base:** the screenshots and the real-OmO check ran before this branch was rebased onto #351, #342 and #350 (per-process agent directories). The checks above were rerun on the rebased branch. - **Linux and Windows:** not run. --------- Co-authored-by: Hako <[email protected]>
Change
안녕하세요. OmO pane에서
/new로 새 대화를 시작해도, 채팅 화면이 새 메시지를 입력하기 전까지 이전 대화를 계속 보여 주는 문제를 확인하여 수정을 제안드립니다.터미널 보기에서
/new를 입력하면 OmO는 새 대화로 넘어가지만, 채팅 보기에는 방금까지의 대화가 그대로 남습니다. 새 메시지를 보내야 비로소 새 대화로 바뀌기 때문에, 그 사이에는 이미 끝난 대화를 현재 대화로 오해하기 쉽습니다. OmO pane에서 메시지를 한 번 주고받은 뒤/new를 입력하고 채팅 보기를 열면 재현할 수 있습니다.원인을 확인해 보니, OmO는
/new직후 새 세션의 holder 기록(session-holders/<새 id>/<pid>.json)을 바로 남기지만, 세션 파일(*.jsonl)은 첫 메시지와 함께 만듭니다. 기존 코드는 holder가 가리키는 세션의 파일이 아직 없으면 그 정보를 건너뛰었습니다. 그 결과 "프로세스 시작 이후 만들어진 유일한 세션" 추론으로 넘어가,/new이전의 파일을 선택하고 있었습니다.이번 변경은 holder 정보를 runtime에 반영하는 부분을
heldRuntime으로 분리하고, 현재 잡고 있는 세션의 파일이 아직 없으면 그 세션 id만 근거로 남깁니다. 이렇게 하면selectOmoTranscript가 이전 파일을 고르지 않습니다. 채팅은 OmO를 처음 실행했을 때와 같은 상태(대화 없음, 터미널 출력 fallback)를 보여 주고, 첫 메시지로 새 세션 파일이 생기면 그 대화를 따라갑니다.--session-id나 herdr의 세션 정보보다 우선).server/omo.test.ts에/new직후(새 세션 파일 없음), launch--session-id가 남은 경우, 첫 메시지로 파일이 생긴 뒤, holder가 없는 경우를 검증하는 테스트를 추가했습니다. 변경 이력도 Unreleased 항목에 기재했습니다.Validation
별도로 만든 테스트 세션과 임시 폴더(
/tmp/omo-new-probe)에서 실제 OmO를 실행했습니다. 메시지 한 번 →/new순서로 입력하고, 각 단계에서/api/pane/conversation응답과 실제 브라우저의 채팅 화면을 기록했습니다. 원본(47df814)과 수정본을 같은 스크립트로 각각 실행했습니다.47df814omo-transcript, 1 turnomo-transcript, 1 turn/new직후(입력 없음)omo-transcript, 1 turn(이전 대화)scrollback, 0 turn(새로 시작한 OmO와 동일)수정 전 캡처 (
/new직후)수정 후 캡처 (
/new직후)캡처는 이번 검증용으로 생성한 테스트 세션에서 촬영했습니다. 운영 중인 터미널이나 사용자 대화는 포함하지 않았으며, 이미지와 재현 스크립트, 단계별 기록(수정 전, 수정 후)은 포크의 별도 자료 브랜치에 보관했습니다.
검증 환경: Linux(WSL), Herdr 0.9.3, OmO 5.1.10, Bun 1.4.2, lockfile에 맞는 Playwright Chromium 153.
bun run typecheck: 통과bun run build: 통과bun run test:unit: 1,037건 통과, 3건 건너뜀, 실패 없음server/omo.contract.test.ts,server/omo-prompt.contract.test.ts: 8건 통과, 실패 없음/new이후 첫 메시지로 새 세션 파일이 생기면 그 대화를 따라가는 동작은 단위 테스트로 확인했습니다. 실제 OmO로는/new직후 단계까지만 기록했습니다.확인해 주시면 감사하겠습니다.
/new직후 채팅에 보여 줄 상태(현재는 OmO를 처음 실행했을 때와 같은 fallback)에 선호하시는 방향이 있으면 그에 맞춰 조정하겠습니다.