Skip to content

Integrate desktop sidebar runtime fixes / 整合桌面侧边栏运行态修复#4942

Merged
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/sidebar-resilience-integration
Jun 20, 2026
Merged

Integrate desktop sidebar runtime fixes / 整合桌面侧边栏运行态修复#4942
SivanCola merged 2 commits into
esengine:main-v2from
SivanCola:fix/sidebar-resilience-integration

Conversation

@SivanCola

@SivanCola SivanCola commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

This integration PR combines the directly related desktop sidebar/session runtime work into one conflict-resolved branch on top of main-v2.

It keeps the useful sidebar resilience and performance pieces while avoiding the unsafe full ProjectNode result cache from #4889: runtime fields are recomputed on each ListProjectTree call, so Open, Running, and Status cannot be served from stale tree state.

Integrated PR contributions

Source PR Author Contribution carried into this PR
#4858 @ttmouse Baseline sidebar session-list performance work already merged into main-v2; this PR builds on that cache/fan-out direction instead of replacing it.
#4889 @ttmouse Bounded sidebar sidecar reads for read-only listing paths, serialized ListProjectTree rebuilds, concurrent project topic sidecar loading, avoiding repeated topic-title file reads, and path-scoped single-instance IDs. The unsafe full-tree result cache and un-migrated config-dir move are intentionally not included.
#4776 @GTC2080 Release removed session runtimes before moving session artifacts to trash, preserving Windows file-handle safety and autosave regression coverage.
#4934 @liaoyl830 Preserve planner isolation around real desktop session/controller changes. Pure tab activation is intentionally not reset after follow-up review so a tab keeps its own planner history when the user returns to it.
#4400 @myipanta Snapshot writable tabs before unregistering them so CloseTab/DeleteSession cannot resurrect deleted session files, while read-only channel transcripts remain browse-only on close.

Notes

  • REASONIX_DEV still skips the single-instance lock for contributor workflows.
  • desktopConfigDir() remains on the existing platform config path; this PR does not move tabs/projects to ~/.reasonix without migration.
  • The timeout path does not let late session-directory goroutines write shared tree maps after ListProjectTree has moved on.
  • Metadata load-modify-save paths do not use the bounded listing timeout, so a transient slow read cannot overwrite sidecars with an empty map.
  • No provider-visible prompt prefix, tool schema, provider serialization, or cache-impact surface is changed.

Verification

  • go test -run 'TestSingleInstance|TestOpenProjectTabResolvesProjectSessionFromLegacyDir|TestProjectTreeShowsBackgroundJobStatus|TestCloseTabNoResurrectionFromAutosave|TestTurnDonePersistsSession|TestTrashTopic|TestDeleteSession' -count=1
  • go test -run 'TestSetSessionTitlePreservesExistingTitlesWhenTimedReadSlotsFull|TestTopicMetadataUpdatesPreserveExistingEntriesWhenTimedReadSlotsFull|TestSetActiveTabDoesNotResetPlannerSession|TestCloseActiveTabDoesNotResetSurvivorPlannerSession|TestCloseReadOnlyChannelTabDoesNotSnapshotTranscript|TestOpenChannelSessionForTabIsReadOnly' -count=1
  • go test ./... from desktop/
  • git diff --check origin/main-v2...HEAD

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1538c6c477

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/tabs.go
Comment thread desktop/tabs.go Outdated
Comment thread desktop/tabs.go
Combine the sidebar/session resilience work from related PRs into one integration change.

- Preserve session runtime teardown before trash moves and CloseTab snapshot ordering.
- Reset planner sessions on desktop tab activation changes.
- Add bounded sidebar sidecar reads and safe ListProjectTree fan-out without caching runtime ProjectNode state.
- Keep REASONIX_DEV single-instance bypass while allowing path-scoped release/dev locks.

Co-authored-by: ttmouse <[email protected]>
Co-authored-by: GTC2080 <[email protected]>
Co-authored-by: liaoyl830 <[email protected]>
Co-authored-by: myipanta <[email protected]>
@SivanCola SivanCola force-pushed the fix/sidebar-resilience-integration branch from b385e16 to e89419a Compare June 20, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant