Skip to content

git commit -m "refactor(app): remove old-server compatibility path in…#2423

Open
melihaltin wants to merge 1 commit into
different-ai:devfrom
melihaltin:cleanup/remove-old-server-compatibility
Open

git commit -m "refactor(app): remove old-server compatibility path in…#2423
melihaltin wants to merge 1 commit into
different-ai:devfrom
melihaltin:cleanup/remove-old-server-compatibility

Conversation

@melihaltin

Copy link
Copy Markdown

Summary

  • Removed the legacy compatibility fallback path for session reads in the OpenCode client wrapper.
  • The client now uses the workspace-scoped OpenWork session APIs directly for listing sessions, reading session details, loading messages, and reading session snapshots/todos.
  • Removed the old TODO comment and simplified the wrapper logic around the new session read flow.

Why

  • The previous implementation included a fallback path for older OpenWork servers.
  • That compatibility layer added extra branching and made the session-read flow harder to reason about.
  • Moving to the workspace-scoped endpoints directly makes the behavior more consistent and easier to maintain.

Issue

  • Closes # N/A (Codebase TODO cleanup)

Scope

  • Updated the OpenCode client integration in apps/app/src/app/lib/opencode.ts
  • Simplified session read handling for:
    • session listing
    • session lookup
    • session messages
    • session snapshot/todo loading

Out of scope

  • No UI changes
  • No new session features
  • No changes to prompt/command execution behavior

Testing

Ran

  • pnpm --filter @openwork/app test:refactor
  • pnpm --filter openwork-server exec bun test src/session-read-model.e2e.test.ts
  • pnpm --filter @openwork/app test
  • git diff --check -- apps/app/src/app/lib/opencode.ts

Result

  • pass/fail: PASS
  • All 8 server workspace session read model tests passed successfully.
  • All 83 app Bun tests passed with 0 failures.
  • App refactor suite (typecheck, health, sessions) completed with zero regressions.
  • Diff whitespace check passed successfully.

CI status

  • pass: Pending (Will update once GitHub Actions complete)
  • code-related failures: None
  • external/env/auth blockers: None

Manual verification

  1. Connect to an OpenWork server that exposes the workspace-scoped session APIs.
  2. Open an existing session and confirm that session details load correctly.
  3. Verify that messages and todos/snapshot data load without regressions.

Evidence

  • N/A (refactor-only)

Risk

  • Low
  • Risk is mostly around compatibility with older server versions that may not yet expose the new workspace-scoped session endpoints.

Rollback

  • Revert the changes in apps/app/src/app/lib/opencode.ts to restore the previous fallback-based behavior.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, Comment, Open in v0 Jul 2, 2026 11:50am

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@melihaltin is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

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