Skip to content

feat(desktop): integrate Sept 27 client acceptance - #523

Merged
PeterGuy326 merged 5 commits into
mainfrom
feat/sept27-client-acceptance
Sep 28, 2026
Merged

PeterGuy326 merged 5 commits into
mainfrom
feat/sept27-client-acceptance

Conversation

@PeterGuy326

Copy link
Copy Markdown
Contributor

Preflight

  • Searched open and closed PRs for related changes.
  • No credentials, personal data, private paths, or private screenshots.
  • Single squashed commit 16cee40; parent is main @ 15ad3ab (current head), ancestry clean.

Summary

Sept 27 client acceptance pass, delivered as one squashed commit on top of current main. Five areas of the desktop client move together:

  1. Live markdown editing — documents are edited in place through Vditor IR (docs/LiveMarkdownEditor.tsx) instead of a read-only render plus a separate composer path, with a full shortcut set and an in-app cheatsheet.
  2. Turn timeout semantics — the turn timeout becomes an inactivity window instead of a hard wall-clock cap, so a turn that is still producing output is no longer killed mid-stream.
  3. Navigation — entries are grouped by context, the employee header stays stable while switching modules, and editor scrolling is bounded to its own container instead of the page.
  4. Docs chrome — the document toolbar is consolidated and the collaboration chrome simplified.
  5. Memory page — the source sidebar is replaced by top tabs; the file list and frontmatter rendering are compacted.

Change

Renderer (apps/desktop/renderer)

  • docs/LiveMarkdownEditor.tsx (+378) / .css (+169): new Vditor IR editor surface, shortcuts, cheatsheet.
  • docs/DocsPanel.tsx (+842), DocsModule.tsx, DocViewer.tsx: toolbar consolidation, live editing wired into the docs flow.
  • approvals/ApprovalDetailDrawer.tsx (−446) → approvals/ApprovalDetail.tsx (+378): drawer replaced by a dedicated detail surface; ApprovalQueue.tsx updated to match.
  • turns/TurnPanel.tsx / TurnThread.tsx, groups/GroupsPanel.tsx, memory/MemoryModule.tsx: navigation grouping, stable header, bounded scrolling, memory tabs.
  • markdown/Markdown.tsx: readable-render adjustments for the new editor.

Main process (apps/desktop/src)

  • docs-ipc.cjs (+131), workspace-ipc.cjs (+23), main.js, preload.js: IPC for live document editing and workspace reload.

Server (apps/server)

  • routes/docs.ts (+452): document read/write surface backing the live editor.
  • engine/driver-cli.ts, turns/store.ts: inactivity-window turn timeout.
  • context-sources.ts, server.ts: wiring.

Shared / i18n

  • packages/shared/src/docs.ts (+53), api.ts, errors.ts; packages/ui/src/locales/{en,zh}.ts (+107/+109).

New dependency: vditor@4.0.0 (pinned) in apps/desktop/package.json.

Evidence

Item Result
Diff 71 files, +8598 / −2045
Base main @ 15ad3ab, parent of head 16cee40
New/expanded specs docs-lifecycle.test.tsx (+889), live-markdown-editor.test.tsx (+469), App.test.tsx (+765), approval-enhancements.test.tsx (+387), docs-ipc.test.cjs (+88), server/test/docs.test.ts (+422), reports.test.ts (+75), turn-driver.test.ts (+28)
New smoke scripts smoke-live-markdown.cjs, smoke-approval-workspace.cjs, smoke-graph-scroll.cjs, smoke-navigation.cjs, smoke-loading-motion.cjs
CI on this PR pending — will be reported before merge

Honest caveat

This commit is an acceptance bundle produced on a machine that cannot push to GitHub directly; it was transported as a signed-off bundle and restored here, so the authorship path is bundle → fetch → push rather than a normal local branch. Local build/test verification is being run in parallel; results will be posted as a comment before merge, and merge is gated on green CI plus review.

Verification

  • Pending: renderer suite + server suite + production build (results to be appended in a comment).
  • CI: ubuntu / macOS / CodeQL / Dependency Review on this PR.

Acceptance

  • Document editing works in place, shortcuts and cheatsheet reachable from the editor.
  • A long turn that keeps emitting output is not terminated by the timeout.
  • Navigation groups entries by context; the employee header does not remount on module switch; editor scroll is contained.
  • Memory page shows top tabs instead of a source sidebar; file list and frontmatter are compact.

Comment thread scripts/smoke-approval-workspace.cjs
Comment thread scripts/smoke-graph-scroll.cjs
Comment thread scripts/smoke-graph-scroll.cjs
Comment thread scripts/smoke-live-markdown.cjs
Comment thread scripts/smoke-live-markdown.cjs
Comment thread scripts/smoke-live-markdown.cjs
Comment thread scripts/smoke-live-markdown.cjs
Comment thread scripts/smoke-navigation.cjs
Comment thread scripts/smoke-navigation.cjs
Comment thread scripts/smoke-navigation.cjs
@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Technical review — layout regression blocks merge

CI on this PR is not green, and the failures are all in one place: layout.

Job Result
Node 24 / ubuntu-latest ✅ pass
CodeQL / Dependency review / Scorecard ✅ pass
Unsigned installers (macOS arm64, Windows x64) ✅ pass
Node 24 / macos-14 ❌ fail (Verify workbench → check-layout-parity.mjs)
Layout smoke macOS arm64 (#127 AC-004) ❌ fail
Layout smoke Windows x64 (#127 AC-004) ❌ fail
Layout parity / macOS vs Windows ⏭ skipping

Concrete errors from the macOS Verify workbench log:

layout parity FAILED:
 - macos: column bottom delta 40px exceeds 2px
layout parity FAILED:
 - left column width differs: mac 560px vs win 500px (max 4px)
Error: .../owb-parity-JJ7V4x/mac.json: layout is null — the two-column org module did not render
Error: .../owb-parity-V82q9y/mac.json: layout has no usable viewport measurement; a height difference cannot be attributed without it
Error: .../owb-parity-PKzH9R/mac.json: layout measurement never settled within its budget; a mid-layout sample cannot be compared across platforms

These line up directly with the layout-touching parts of this commit: context-grouped navigation, the now-stable employee header, bounded editor scrolling, and the memory page's sidebar-to-tabs change. The most serious signal is the two-column org module did not render — on macOS the org module is not producing a measurable two-column layout at all, which is a functional regression, not a cosmetic 2px drift.

The green ubuntu job does not contradict this: layout parity and the staging layout smoke are cross-platform checks and are the ones that run the packaged app, so they are the authority here.

Not merging. Requested follow-up before this can move:

  1. Re-run the layout smoke locally and diff the org module's two-column measurements against main @ 15ad3ab; fix whichever of the four layout changes (nav grouping / header / scroll bounds / memory tabs) introduced the 40px bottom delta and the 560 vs 500px left-column split.
  2. Make sure the org module reaches a settled layout within the measurement budget on macOS — layout measurement never settled suggests a late or animation-gated layout pass.
  3. Re-push and confirm all three layout jobs are green, then this is mergeable.

Local note (informational only): the renderer suite on my machine reports 636 passed / 5 failed, but that environment is missing the pinned design-system package (@fullstack-ai-infra/ui/styles.css cannot resolve), so local numbers are not evidence here — CI is.

- Live markdown editing (Vditor IR) with full editor shortcuts and a cheatsheet
- Turn timeout as inactivity window; reports reload the selected conversation
- Context-grouped navigation, stable employee header, bounded editor scrolling
- Consolidated document toolbar; simplified collaboration chrome
- Memory page: source sidebar replaced by top tabs, compact file list and frontmatter
@PeterGuy326
PeterGuy326 force-pushed the feat/sept27-client-acceptance branch from 16cee40 to 3114747 Compare September 27, 2026 16:42
@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Update — rebased onto current main and the layout regression is fixed

Two things happened since the review comment above.

1. Rebase. main moved to b3704c45 when #515 merged (it touches App.tsx), which left this PR CONFLICTING / DIRTY. Rebased onto b3704c4; the only conflict was the activeModule union plus the new contactsOpen / groupListHost / conversationHeaderHost / groupsOpened state in App.tsx, resolved by keeping both — the new modules and state from this branch, and #515's widened ConfigurationCategory for settingsInitialCategory. Diff is unchanged at 71 files, +8598 / −2045.

2. Root cause of the layout failures — found and fixed.

The packaged layout smoke (#127 AC-004) does not navigate: it launches the real renderer and measures the two-column org workspace from its first paint. This branch moves the entry module to the new conversation module, so that first paint no longer contains .owb-org-module__left / .owb-org-module__pane--right > .owb-turn-panel, and the measurement came back null:

Error: .../mac.json: layout is null — the two-column org module did not render

That single cause produced all three red jobs (macOS Verify workbench, Layout smoke macOS arm64, Layout smoke Windows x64).

Fix (3114747): main loads the renderer with ?owbLayoutModule=org in layout mode only, and App.tsx honours that query when seeding activeModule. A normal launch carries no query and still opens the conversation module, so the acceptance change to the entry point is preserved — only the measurement path is told which module to open.

One correction to my earlier comment: the column bottom delta 40px and left column width differs: mac 560px vs win 500px lines are not a second regression. They are the expected stderr of scripts/test/layout-parity.test.mjs (the cases at lines 36 and 40 assert that those failures are detected). The real failure was only the null layout.

CI re-running on head 3114747.

@PeterGuy326
PeterGuy326 force-pushed the feat/sept27-client-acceptance branch from 3114747 to 04be66d Compare September 27, 2026 16:54
@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Correction — the layout failures are structural, and my previous fix was a misdiagnosis

Head 3114747 is withdrawn (branch back to 04be66d). It did not fix anything, and the reasoning behind it was wrong. Here is what the evidence actually says.

What #127 AC-004 measures. apps/desktop/src/packaged-smoke.cjs measures exactly two elements and nothing else:

document.querySelector(".owb-org-module__left")
document.querySelector(".owb-org-module__pane--right > .owb-turn-panel")

Those elements no longer exist on this branch. On main, App.tsx renders the left column itself:

<OrgWorkspaceSplit left={<div className="owb-org-module__left"> … PositionCard … } />

On this branch App.tsx contains no OrgWorkspaceSplit and no .owb-org-module__left at all. The org module now renders either

  • <section className="owb-organization-directory"> (structure directory), or
  • RelationshipGraph (overview),

and the conversation side has moved into its own module (.owb-module-pane.owb-employee-conversation). The measured two-column object has been taken apart by this refactor, so the measurement has nothing to sample and returns null:

Error: .../mac.json: layout is null — the two-column org module did not render

The entry-module change (conversation instead of org) makes it worse but is not the cause: even with the org module opened, the two measured selectors are gone. My ?owbLayoutModule=org patch assumed the columns still existed underneath, which is why it changed nothing.

Also correcting my earlier comment: the column bottom delta 40px and mac 560px vs win 500px lines are expected stderr from scripts/test/layout-parity.test.mjs (lines 36 and 40 assert those failures are detected), not a second regression.

This is now an AC-004 contract question, not a bug I can patch unilaterally. Three ways forward, and they are a product/acceptance decision rather than a review call:

  1. Keep the two-column org workspace — restore OrgWorkspaceSplit + .owb-org-module__left for the org module. Contract unchanged, CI green, but it gives back part of the Sept 27 restructure.
  2. Re-point AC-004 at the new layout — decide which two containers now constitute "the two columns" (for example the conversation module's list vs thread) and update the selectors plus the parity thresholds together.
  3. Retire the two-column measurement for this shape and measure whatever the new first-class layout is — which means editing fix(ui): align position-record and turn panels + Chinese IME + Windows parity evidence #127's acceptance criteria deliberately.

I have left the branch at the rebase (04be66d, 71 files, +8598 / −2045) with no extra patch, so whichever option you pick starts from a clean base. Tell me which one and I will implement it and drive CI.

#523 replaces the org module's left column plus turn panel with a structure
directory / relationship graph and moves the conversation into its own
module, so the AC-004 selectors

  .owb-org-module__left
  .owb-org-module__pane--right > .owb-turn-panel

match nothing. The packaged layout smoke measures its first paint without
navigating, so it measured null and failed on macOS arm64 and Windows x64:

  Error: .../mac.json: layout is null - the two-column org module did not render

Point the measurement at the pair that now carries that geometry: the
collaboration sidebar (.ui-app-shell__sidebar) beside the conversation turn
panel (.owb-employee-conversation .owb-turn-panel). The conversation module
is the entry module, so the first paint still offers both columns.

The comparison itself is unchanged: two columns that end together, of equal
height, with platform-stable widths and platform-stable chrome overhead.

Updates the hard-coded selectors in packaged-smoke.test.cjs and the
"two-column org workspace" wording in the checker and harness to match.

Refs #127
First attempt measured the sidebar against the conversation turn panel. On
both platforms the panel came back 127px shorter (mac 641 vs 514, win 680 vs
553) with a 14px bottom delta, because the panel starts below the context
header - that compares the header against the sidebar, not one column
against the other.

Measure the shell's main region instead: it is the other column of the pair,
shares the shell's grid row with the sidebar, and is what 'two columns that
end together' means here.

Refs #127
…ot to zero

The two columns used to be siblings inside the org module and had to be the
same height. Since #523 they are the shell sidebar and the shell main region,
and the main region starts below the context header, so a real difference
exists by design: 48px on both runners (mac 641 vs 593, win 680 vs 632), with
the bottoms aligned.

Requiring |leftHeight - rightHeight| <= 2px now fails on a layout that is
working, so compare the difference across platforms instead: it must agree
within 8px, which still catches the case it was written for - one runner
laying the pair out differently - while accepting a header that exists on
both. bottomDelta, widths and chrome overhead are unchanged.

Updates the #190 per-platform height case to pin the new cross-platform rule.

Refs #127

@Bindy-lbb Bindy-lbb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review outcome: I cannot approve this head yet because the current required checks are 10/11, not 11/11. Node 24 / macos-14 failed after the layout checks completed successfully.

The failing assertion is renderer/test/project-board.test.tsx → clamps schedule bar calculations…: it expects the bar for Partially invalid date task (whose only valid date is hard-coded as 2026-09-22). On the macOS run dated 2026-09-28, the 28-day schedule window begins on 2026-09-28, so that task is correctly rendered as outside the window and no bar exists. The test needs a date relative to the test window (or must navigate the window) before CI can be green.

On the requested AC-004 point: the final selector pair is sidebar + shell main, not the nested turn panel. That matches the restructured first-paint conversation layout; bottom alignment remains enforced and comparing the cross-platform 48px height offset is appropriate. Minor follow-up: update check-layout-parity.mjs comments/error wording that still call the main region a “turn panel.”

@PeterGuy326
PeterGuy326 force-pushed the feat/sept27-client-acceptance branch from 0ccddf1 to 5fcc024 Compare September 28, 2026 01:31

@Bindy-lbb Bindy-lbb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已按当前 head 5fcc024 复核。AC-004 的实际测量目标(协作侧栏 + shell main)与高度差跨平台稳定性规则都正确,布局 smoke 也通过。\n\n但本轮 verify 的两个 Node 24 job 仍失败,不能 approve: 的排期用例把部分无效日期任务的唯一有效日期固定为 。运行日为 2026-09-28 时,它已落在 28 天窗口之外,故没有可断言的 schedule bar(CI 报 )。请将该日期锚定到测试窗口/固定系统时间,或在用例中导航窗口;重跑绿灯后我会立即复核批准。

@Bindy-lbb

Copy link
Copy Markdown
Collaborator

更正上一条 review 的文字渲染:阻塞项位于 renderer/test/project-board.test.tsx。排期测试把部分无效日期任务的唯一有效日期写死为 2026-09-22;在 2026-09-28 运行时它位于 28 天窗口之外,CI 因此找不到 Partially invalid date task 的 schedule bar。将日期锚定到测试窗口或固定系统时间(或显式导航窗口)后,两个 Node 24 job 应可恢复通过。

The schedule view renders a 28-day window anchored at the current
week's Monday, so fixtures hard-coding 2026-09-22 drifted outside the
window once the run date passed it and their bars disappeared
(failing Node 24 / macos-14 since 2026-09-28). Window-sensitive
fixtures now derive dates from today, keeping the assertions
calendar-independent without pinning system time.
@PeterGuy326

Copy link
Copy Markdown
Contributor Author

Fixed the date-dependent failure Bindy flagged in CHANGES_REQUESTED: renderer/test/project-board.test.tsx hard-coded 2026-09-22 / 2026-09-28 in the schedule-window tests, and the board renders a 28-day window anchored at the current week's Monday — once the run date passed 2026-09-28 those fixtures fell outside the window and their bars disappeared.

Changes (commit 56be576):

  • Added an isoFromToday(offset) helper; window-sensitive fixtures in clamps schedule bar calculations… and safely groups malformed or invalid dates… now derive dates from today (inverted task = today+1/today, partial task due = today+5, valid task = today+1→today+4), so the assertions stay calendar-independent without pinning system time.
  • The span task (2025→2027) and form-input tests are window-independent and unchanged.

Verified locally: vitest run renderer/test/project-board.test.tsx → 20/20 passed. Head is 5fcc024 + this one test-only commit; no source changes.

@Bindy-lbb Bindy-lbb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the date-dependent schedule fixtures now derive from today, and all 11 checks pass on 56be576.

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.

3 participants