Skip to content

fix desktop Global topic index repair#6036

Merged
SivanCola merged 4 commits into
esengine:main-v2from
SivanCola:fix/global-topic-index-repair
Jul 6, 2026
Merged

fix desktop Global topic index repair#6036
SivanCola merged 4 commits into
esengine:main-v2from
SivanCola:fix/global-topic-index-repair

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • repair desktop project-tree indexes for legacy Global sessions whose session metadata already has a topic ID but whose sidebar topic index is missing
  • preserve explicit topic deletion by recording deleted topic tombstones so repaired Global topics do not reappear after the user removes them
  • add regression coverage for the repaired Global topic path and the delete-does-not-resurrect behavior

Root cause

Some upgraded desktop states can contain Global session metadata with topic_id and topic_title already set, while desktop-projects.json and the Global topic title index are missing the matching topic entries. The legacy migration skipped those sessions because they already had topic metadata, leaving the sidebar with no Global section when another project existed.

Validation

  • go test . -run 'Test(ProjectTreeRepairsIndexedGlobalTopicsAfterMigrationMarker|DeletedRepairedGlobalTopicIsNotAutoRestored|RestoreGlobalTopicSessionReindexesProjectTree|RestoreProjectTopicSessionReindexesProjectTree|TrashTopicMovesRelatedSessionsToTrash|DeleteTopicKeepsSessionHistory)'

Note: a full desktop package run currently hits an existing TempDir cleanup failure in TestTurnDonePersistsSession, unrelated to this topic-index change.

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jul 5, 2026
@SivanCola SivanCola marked this pull request as ready for review July 6, 2026 02:39
@SivanCola SivanCola requested a review from esengine as a code owner July 6, 2026 02:39
@SivanCola SivanCola merged commit d582387 into esengine:main-v2 Jul 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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