Skip to content

fix(app): show workspace conversation inventory counts - #4816

Merged
yomgui merged 7 commits into
devfrom
investigate/sidebar-archive-workspace-counts
Sep 10, 2026
Merged

yomgui merged 7 commits into
devfrom
investigate/sidebar-archive-workspace-counts

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix a longstanding sidebar UX consistency defect, not a regression: Archived and custom groups expose inventory, but workspace headers never did.

  • Add a quiet count of unarchived top-level conversations belonging to each workspace, including pins and side chats, excluding drafts and children.
  • Keep totals stable across collapse, Show more, pinning and grouping.
  • Require completed inventory and healthy load/connection state before displaying a number, including zero. Explicit reloads immediately enter loading state. Preserve the accessible workspace name; explain the count via aria-description and tooltip.
  • Preserve Archived filtering, count, entries and behavior. No setting, backend aggregate or new persistence.

RCA and Decision

AppSidebar aggregates archived records globally, while WorkspaceHeader had no count input. Raw array length includes children/archives; preview length excludes pins and older rows. Propagate completed-list knowledge through toSessionGroups and reuse root/archive predicates before presentation filtering. Pagination beyond 200 records was already fixed in #4783.

Ownership count is preferred. Section count decreases when pinning without changing ownership; removing Archived count loses its collapsed inventory signal; an optional toggle adds unnecessary settings. This product assessment is ours, with no claim of human designer consultation.

Sources: #2035 introduced Archived (n); #3064 made it global. start-here/do-work-with-it/workflows.mdx documents non-destructive archive and workspace-specific groups.

Research supplied for the decision:

Verification

Passed for this change on 02a4a0b05067621071cdddfbe5be893fcad19e49: 12 tests, zero failed, zero skipped. Node 24.20.0 and pnpm 11.4.0. All commands below exited 0.

Command Lane Result
pnpm evals:pr specs/route-session-list.test.ts Local, HTTP witnesses and pure inventory contract 9 passed
pnpm --filter @openwork/app typecheck Local Passed
OPENWORK_EVAL_DAYTONA=1 pnpm evals:e2e workspace-conversation-count --engine v1 Daytona appWeb, cold isolated worlds 2 passed
OPENWORK_EVAL_DAYTONA=1 pnpm evals:e2e session-archive-undo --engine v1 Daytona Electron, cold isolated world 1 passed

Runtime commands used Infisical injection and OPENWORK_EVAL_REF set to the full head SHA. Temporary sandboxes were deleted. The empty-inventory fault test proves rendered 0 -> absent during held HTTP request -> absent after 403 -> 0 after recovery. Grouping proof actually moves a pinned conversation, then unpins it into the group. The desktop archive test compares against independent server inventory, including any bootstrap root, then asserts N -> N-1 -> N. Warden re-review reports zero findings; both original proof advisories are addressed.

Composed local publication failed independently of the test verdict: the available Blob credential targets a public store, while the review app requires private access; OPENWORK_REVIEW_BLOB_TOKEN is unavailable in the injected environment. The three runtime sections were rendered with the existing single-run publisher in text-only mode and posted together using gh pr comment --body-file -. The renderers label that mode Dry run; the linked comment is the actual published evidence. Screenshots were not uploaded or claimed as visual proof. No stale-SHA force flag or private-store bypass was used.

Diagnostics and Follow-ups

  • Clean control at origin/dev 6909f4ea0 reproduces pnpm --dir evals run typecheck:spec-layer exit 2: nine Promise.withResolvers/es2023 library errors. The same control reproduces node evals/scripts/spec-boundary-ratchet.mjs exit 1 with the same seven existing violating specs. Required CI build/core checks pass; no baseline widening or bypass.
  • Headless-web v1 archive returned an undefined-data length error while clean-upstream native desktop archive passed. This does not establish a general archive regression; the native desktop journey proves the archive count transition. Further headless archive diagnosis is outside this diff.
  • Configure the private review upload credential to include these local runtime images in the private report. Text assertions are already published; report storage is not a required CI check.

Learnings are retained in the inventory and archive specs, not private memory.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 5:14pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Ignored Ignored Preview Sep 10, 2026 5:14pm UTC
openwork-diagnostics Ignored Ignored Preview Sep 10, 2026 5:14pm UTC
openwork-landing Ignored Ignored Preview Sep 10, 2026 5:14pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (52443 ms), confidentiality-review (95149 ms), spec-provenance-review (163131 ms), desktop-den-sync-review (150413 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 3
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 3/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 10, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (1ae742a75c419a45bb1e9e6a9e8ad01ac369f323). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Passed · 10/10 tests · 15/15 assertions · 5 images

Commit 02a4a0b05067621071cdddfbe5be893fcad19e49 · selected evidence

Open review report

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (02a4a0b05067621071cdddfbe5be893fcad19e49). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Selected test run: workspace inventory counts survive previews, pins, groups, drafts and reload · SHA 02a4a0b · engine v1 · 7m old

Test evidence — workspace inventory counts survive previews, pins, groups, drafts and reload — ✅ passed

SHA 02a4a0b · engine v1

✅ passed · 0 expectations passed · 0 failed · 0 pending

Dry run: screenshots were not attached.

[world] appWeb(daytona) · workspace(/tmp/openwork-workspace-inventory-1789060415177) · sessions(21)
[user] see(testId=workspace-conversation-count-ws_4157f09d109b, text="21", timeoutMs=90000)
[probe] dom("[data-sidebar-workspace-title][aria-description="21 unarchived top-level conversations, including pinned conversations"]")
[user] text=Show 6 more · click(text=Show 6 more) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21") · label=Collapse · click(label=Collapse) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21") · notSee(testId=sidebar-session-ses_f73af41ddffeDuc2BJWdTHLCVn) · label=Expand · click(label=Expand) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21")
[agent] run(session.pin)
[user] see(text=Pinned) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21")
[agent] run(session.group.create) · run(session.group.move)
[user] see(text=Inventory review) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21")
[agent] run(session.pin)
[user] notSee(text=Pinned) · see(testId=sidebar-session-ses_f73af41ddffeDuc2BJWdTHLCVn) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21") · label=New session · click(label=New session) · see(composer, editable) · type(composer, "Unsent inventory note") · see(testId=sidebar-new-task-draft-ws_4157f09d109b) · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21") · reload · see(testId=workspace-conversation-count-ws_4157f09d109b, text="21", timeoutMs=90000) · notSee(text=Pinned) · see(text=Inventory review)
steps 1 ✅ the full inventory is named accessibly before Show more (3.7s) · 2 ✅ pinning and grouping do not remove conversations from their owning workspace (5.1s) · 3 ✅ a real unsent draft adds no conversation (0.5s) · 4 ✅ a cold renderer reload retains the inventory and count explanation (4.8s)
verdict passed · 18 user observations (see ×15, notSee ×3) · 1 probes · steps 4/4


Test run created 2026-09-10T17:13:35.157Z · Source: evals/results/test-runs/2026-09-10T17-13-35-157Z-workspace-inventory-counts-survive-previews-pins-groups-drafts-and-reload/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4816 --test-run 2026-09-10T17-13-35-157Z-workspace-inventory-counts-survive-previews-pins-groups-drafts-and-reload

Selected test run: confirmed empty workspace shows zero but pending and failed inventory never do · SHA 02a4a0b · engine v1 · 6m old

Test evidence — confirmed empty workspace shows zero but pending and failed inventory never do — ✅ passed

SHA 02a4a0b · engine v1

✅ passed · 0 expectations passed · 0 failed · 0 pending

Dry run: screenshots were not attached.

[world] appWeb(daytona) · workspace(/tmp/openwork-empty-workspace-inventory-1789060516005) · [seed:raw] evalIn()
[user] see(testId=workspace-conversation-count-ws_b2320118ec7b, text="0", timeoutMs=90000)
[probe] dom("[data-sidebar-workspace-title][aria-description="0 unarchived top-level conversations, including pinned conversations"]") · eventually(inventory request held at HTTP boundary)
[user] notSee(testId=workspace-conversation-count-ws_b2320118ec7b)
[agent] run(workspace.reload_sessions)
[user] notSee(testId=workspace-conversation-count-ws_b2320118ec7b)
[probe] dom("[data-sidebar-workspace-title][aria-description]")
[agent] run(workspace.reload_sessions)
[user] see(testId=workspace-conversation-count-ws_b2320118ec7b, text="0")
steps 1 ✅ a completed empty inventory has an accessible zero (0.1s) · 2 ✅ a held read and its rejection hide zero until a successful reload (7.4s)
verdict passed · 4 user observations (see ×2, notSee ×2) · 3 probes · steps 2/2


Test run created 2026-09-10T17:15:15.986Z · Source: evals/results/test-runs/2026-09-10T17-15-15-986Z-confirmed-empty-workspace-shows-zero-but-pending-and-failed-inventory-never-do/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4816 --test-run 2026-09-10T17-15-15-986Z-confirmed-empty-workspace-shows-zero-but-pending-and-failed-inventory-never-do

Selected test run: session archive is honest about availability and can be undone when supported · SHA 02a4a0b · engine v1 · 4m old

Test evidence — session archive is honest about availability and can be undone when supported — ✅ passed

SHA 02a4a0b · engine v1

✅ 0/2 screenshots passed · 0 expectations passed · 0 failed · 0 pending

Dry run: screenshots were not attached.

[world] desktop(daytona) · workspace(/tmp/openwork-session-archive-undo-1789060721596) · sessions(2) · [seed:raw] evalIn()
[agent] run(session.open)
[probe] hash · eventually(neighbor session route opens) · eventually(both sessions listed as active)
[user] see(testId=workspace-conversation-count-ws_42c8da747810, text="2") · notSee(text=Session archived) · hover(testId=sidebar-session-ses_f73abaa6effebY6oNbsX1UA20v) · see(testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v) · testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v · click(testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v) · see(text=Session archived, timeoutMs=30000)
[probe] eventually(undo pill finishes sliding in)
[user] see(label=Undo) · see(label=View) · screenshot
[probe] eventually(candidate archived on the server) · eventually(candidate leaves the workspace tree for the Archived section)
[user] see(testId=workspace-conversation-count-ws_42c8da747810, text="1") · label=Undo · click(label=Undo) · notSee(text=Session archived)
[probe] eventually(candidate active again on the server) · eventually(candidate back in the workspace tree with no Archived section)
[user] see(testId=workspace-conversation-count-ws_42c8da747810, text="2") · notSee(text=Session unarchived) · notSee(label=Undo) · hover(testId=sidebar-session-ses_f73abaa6effebY6oNbsX1UA20v) · see(testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v) · testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v · click(testId=session-archive-ses_f73abaa6effebY6oNbsX1UA20v) · see(text=Session archived, timeoutMs=30000)
[probe] eventually(undo pill finishes sliding in)
[user] label=View · click(label=View)
[probe] hash · eventually(candidate session route opens from View)
[user] notSee(text=Session archived) · see(testId=archived-session) · see(label=Restore) · notSee(composer)
[agent] listActions
[user] screenshot
steps 1 ✅ both sessions are active and nothing is archived (3.9s) · 2 ✅ archiving the candidate moves only it and offers a way back (2.7s) · 3 ✅ Undo restores the candidate without announcing itself (9.8s) · 4 ✅ View opens the archived session and leaves it archived (9.2s)
verdict passed · 19 user observations (see ×11, notSee ×6, screenshot ×2) · 11 probes · steps 4/4

⚪ UNVALIDATED — 1. session archive is honest about availability and can be undone when supported artifact 1

  • ⚪ UNVALIDATED — no visual expectations recorded.

⚪ UNVALIDATED — 2. session archive is honest about availability and can be undone when supported artifact 2

  • ⚪ UNVALIDATED — no visual expectations recorded.

Test run created 2026-09-10T17:16:44.032Z · Source: evals/results/test-runs/2026-09-10T17-16-44-031Z-session-archive-is-honest-about-availability-and-can-be-undone-when-supported/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4816 --test-run 2026-09-10T17-16-44-031Z-session-archive-is-honest-about-availability-and-can-be-undone-when-supported

@yomgui
yomgui marked this pull request as ready for review September 10, 2026 17:22

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (02a4a0b05067621071cdddfbe5be893fcad19e49). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui
yomgui merged commit 2fcbae6 into dev Sep 10, 2026
30 checks passed
@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Merged as 2fcbae6 after the exact-head required check passed and the final Warden run reported zero findings. No protection bypass was used.

Final source head: 02a4a0b. Scoped verification: 12 tests passed, zero failed/skipped, plus app typecheck; runtime lane Daytona (appWeb and Electron), inventory HTTP/contract lane local. All temporary Daytona sandboxes were deleted.

Evidence remains inspectable in the linked CI report and the three generated text-only runtime sections in #issuecomment-5622672711. Private report upload failed due to the public-store Blob credential; no runtime screenshots were uploaded publicly. Follow-ups remain the private review credential, the isolated headless archive discrepancy, and the baseline diagnostic debt documented in the PR body.

yomgui added a commit that referenced this pull request Sep 11, 2026
Revert #4816 because workspace count badges add clutter without enough user value. Preserve the original Archived count and archive/Undo/View behavior; remove count-only UI, state plumbing, and fixtures.

Verified on the PR head: 8 route-session-list tests and 1 cold Daytona Electron archive journey passed, with app typecheck, required CI, and Warden clearance green. Testkit evidence is published on the PR.

Signed-off-by: Guillaume Loret <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – openwork-app — 02a4a0b0 Deployed Sep 10, 2026 by vercel[bot]
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