Skip to content

Archive sessions under projects - #47

Open
Moonerss wants to merge 1 commit into
ai4s-research:masterfrom
Moonerss:worktree-project-session-archiving
Open

Archive sessions under projects#47
Moonerss wants to merge 1 commit into
ai4s-research:masterfrom
Moonerss:worktree-project-session-archiving

Conversation

@Moonerss

Copy link
Copy Markdown
Contributor

Summary

  • Group the global OpenCode session catalog under exact project roots in Sidebar and Projects, while leaving child-directory, subagent, and loose sessions ungrouped.
  • Normalize workspace path comparisons for Windows drive/verbatim/UNC paths and trailing separators, and reuse the same comparison when opening historical sessions.
  • Keep cross-workspace sessions across reconnects by relying on the runtime-wide experimental session endpoint and preserving old state on transient refresh failures.

Test plan

  • pnpm --filter @ai4s/desktop test
  • pnpm --filter @ai4s/desktop typecheck
  • pnpm --filter @ai4s/desktop lint
  • git diff --check
  • pnpm --dir "apps/desktop" exec tauri build --debug --no-bundle --target x86_64-pc-windows-msvc

Notes

  • Windows Tauri build temporarily syncs Cargo features for the target during the build; the committed source keeps macos-private-api enabled for macOS transparent sidebar behavior.
  • macOS and Linux installer builds should be validated by the existing release workflow matrix.

Group the global session catalog under exact project roots so existing work stays discoverable across workspace switches while preserving loose sessions and platform path quirks.

Co-Authored-By: Claude GPT-5.5 <noreply@anthropic.com>
@noahbenjamin1994

Copy link
Copy Markdown
Member

Thanks a lot for this, @Moonerss — the Windows/UNC path normalization and the grouping logic are solid and well-tested. We're keeping it open for now because we're still exploring the best way to present sessions vs. projects in the sidebar (in particular, sessions that aren't tied to any project, and how things scale when there are many projects). We'll follow up here to continue the discussion. Really appreciate the contribution!

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.

2 participants