Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/crates/adapters/webdriver/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ platform-integration crate, not a product runtime or tool-policy owner.
cargo check -p openbitfun-webdriver
```

The crate selects Tauri's raw WebView access and the PNG/JPEG codecs it uses;
focused checks must not depend on feature unification from the Desktop host.

For reveal/focus changes, build Desktop and use the real packaged UI regression
documented in `tests/e2e/AGENTS.md` (`run-interaction-scroll.mjs`).

For documentation-only changes, run `git diff --check`.
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# FlowChat History Paging

## Inactive history residency

Reader bookmarks retain the semantic snapshot, intent and ordinal range, never
the Turn bodies. A mounted primary, BTW or subagent transcript holds a history
lease. The store accounts the union of canonical and paged Turns, which can alias
the same objects, in the shared reconstructable-resource budget. Derived caches
are reclaimed before inactive history when that budget is exceeded.

Unleased local history can return to metadata-only under resource-budget pressure,
only when its Turns are unchanged persisted-read objects. Idle time alone does
not evict history; keep the warm path when resources fit the budget. Selection,
hydration, in-flight reads, runtime interactions and live or unsaved projections
prevent eviction. Relay replicas and dispatch observers keep their existing
owners. Drafts, catalogs, permission mailboxes and runtime state are outside this
cache lifecycle.

On return, a bookmark resolves through the store's existing range reader before
the transcript paints. The viewport owner restores its semantic anchor; a cold
read never navigates to the tail as a fallback. Session, surface and navigation
generation fence the result. Failures expose retry, while stale reads may warm
the cache without replacing a newer reader intent.

## Prepend geometry snapshot

`FlowChatPrependSnapshot` captures the old DOM scroll height in React's
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ cancelled rounds precede it. That boundary prevents cross-round grouping from
hiding the label; ordinary within-round tool folding remains available. Round ids
and virtual row keys stay unchanged, with no viewport writes or mount animation.

Retry history seals the preceding collection once, while the current effective
attempt starts a new collection that can receive following model rounds. Attempt
normalization must not disable grouping for the whole round. Failed attempts stay
in their independent history disclosure and never join the current collection.
For old records, the display policy disregards an unqualified
`disableExploreGrouping` hint only when multiple recorded attempts all use the
native Runtime identity `<round-id>:attempt:<index>`. Explicit host policies carry
the optional `disableExploreGroupingSource: "host"` provenance; older hints with
unrecognized attempt identities remain authoritative. Projection never rewrites
the saved hint, attempts, or member identities.

## Measurement compensation and cached offsets

When the viewport owner accepts a shift for a measured row wholly above the
Expand Down
10 changes: 7 additions & 3 deletions src/web-ui/src/infrastructure/peer-device/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ never determines whether an accepted turn continues running.
`RelaySessionHistory` owns one subscription per visible surface/session.
`SessionRecordReplica` applies both replayed pages and live canonical records
using stable IDs, revisions and tombstones; every page comes from the online
host, and a stream-epoch change (host restart) drops the replica before replay. Following Happy's sync owner,
the latest page paints first; older pages share one in-flight reader and are
prefetched with a yield between pages. Receive cursors advance only after applying
host, and a stream-epoch change (host restart) drops the replica before replay.
The latest page paints first; older pages share one in-flight reader. A visible
open or explicit reader request can warm one adjacent page while the document is
visible and the shared resource budget permits it. This never recursively drains
the transcript. Hiding a view pauses optional prefetch only; live records,
reconnect and interaction-mailbox delivery keep their subscriptions.
Receive cursors advance only after applying
records, never from a send acknowledgement. Transport reconnect resumes that same
subscription. Local Runtime projection machinery is not a second Relay content
writer: peer token/body events must not overwrite canonical records.
Expand Down
16 changes: 16 additions & 0 deletions src/web-ui/src/tools/editor/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ This directory follows `src/web-ui/AGENTS.md`.

## Focused verification

Document-backed code editors may suspend inactive Monaco views after 30 seconds;
at most three inactive views stay warm across hosts. Visible views and active IME
composition are protected. Find/replace widgets and nonempty queries also keep
their view: Monaco does not include this interaction in `saveViewState`, and a
closed widget still owns the query used by F3. `EditorDocument` retains the exact
model, undo/redo, dirty state and saved view state. Closing a suspended view must
still support saving its model. Standalone, rich-text and Diff editors remain
resident until their state has an independently tested owner; do not rebuild a
document to save view memory.

For view residency, also run:

```bash
pnpm --dir src/web-ui run test:run src/tools/editor/services/editorViewResidency.test.ts src/tools/editor/components/CodeEditor.test.tsx
```

For code editor disk synchronization, encoding reloads, and dirty-state changes:

```bash
Expand Down
12 changes: 12 additions & 0 deletions tests/e2e/AGENTS-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,15 @@ pnpm --dir tests/e2e exec wdio run ./config/wdio.conf.ts --spec "./specs/<file>.
## 验证

优先运行最窄的相关 spec,必要时再扩大范围。

验证内置 WebDriver 的滚动、聚焦与外层布局时,先构建 Desktop 和当前前端资源,再运行:

```bash
node tests/e2e/scripts/run-interaction-scroll.mjs
```

该脚本使用真实产品控件、独立的打包前端快照、临时应用存储和私有 WebView 存储,检查点击、
指针与滚轮动作、元素截图、输入清空与填写、屏外控件定位和超大元素点击坐标。证据 `result.json`
保存在输出的临时目录;不使用 Mock 页面,也不代表远程场景或其他平台已经验证。
并行构建时,可用 `OPENBITFUN_E2E_FRONTEND_DIR` 指向含 `frontend-revision.json` 的已完成构建快照。
脚本也复制可执行文件;默认 exe 被开发实例锁定时,可用 `OPENBITFUN_E2E_DESKTOP_BINARY` 指向新链接的产物。
17 changes: 17 additions & 0 deletions tests/e2e/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ pnpm --dir tests/e2e exec wdio run ./config/wdio.conf.ts --spec "./specs/<file>.

Prefer the narrowest relevant spec first, then broaden only if needed.

For embedded WebDriver reveal/focus and shell scroll geometry, build Desktop
and current frontend assets, then run:

```bash
node tests/e2e/scripts/run-interaction-scroll.mjs
```

This runner uses real production controls, an independent packaged frontend
snapshot, temporary application storage and a private WebView store. It checks
click, pointer/wheel actions, element screenshot, input clear/send, offscreen reveal
and oversized click targets, and retains `result.json` in its printed temporary
directory. It does not use a mock page or establish remote/platform coverage.
Set `OPENBITFUN_E2E_FRONTEND_DIR` to a completed build directory with
`frontend-revision.json` to reuse an existing snapshot during concurrent builds.
The runner also snapshots the executable; `OPENBITFUN_E2E_DESKTOP_BINARY` can
select a freshly linked artifact when a development instance locks the default exe.

Markdown editor browser interaction tests (no desktop binary required):

```bash
Expand Down
Loading