Skip to content

fix(messaging): restore router agent auto-heal in React settings#1540

Merged
src-opn merged 4 commits into
different-ai:devfrom
Pagecran:fix/1138-router-agent-autoheal
May 4, 2026
Merged

fix(messaging): restore router agent auto-heal in React settings#1540
src-opn merged 4 commits into
different-ai:devfrom
Pagecran:fix/1138-router-agent-autoheal

Conversation

@pascalandr
Copy link
Copy Markdown
Contributor

Summary

  • Fixes [Bug]: SlackBot not properly stabilizing connection to workspace #1138 by restoring the router-agent auto-heal behavior in the current React settings flow.
  • Replaces the messaging placeholder in apps/app/src/react-app/shell/settings-route.tsx with the real MessagingView wired to live OpenWork router state.
  • Ports the missing controller/state layer into apps/app/src/react-app/domains/settings/state/messaging-view-state.ts, including the old auto-heal path that creates .opencode/agents/opencode-router.md when messaging is enabled and the agent file is missing.

Testing

  • git diff --check upstream/dev...fix/1138-router-agent-autoheal OK
  • git diff --cached --check -- apps/app/src/react-app/domains/settings/state/messaging-view-state.ts apps/app/src/react-app/shell/settings-route.tsx OK while resolving the merge
  • pnpm --filter @openwork/app typecheck could not provide a clean signal in this environment due local TypeScript install issues (react-router-dom, lucide-react, zustand, @tanstack/react-virtual missing) plus an existing streamdown / React types mismatch

Notes

  • This is a larger React re-port than the original one-file Solid fix because the current React shell was still rendering a placeholder for the messaging tab.
  • Kept as draft because this should get a real functional pass through the messaging settings flow before merge.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 23, 2026

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 Apr 30, 2026 8:19am

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 23, 2026

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

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@pascalandr pascalandr marked this pull request as ready for review April 23, 2026 13:16
@src-opn src-opn added the EXTRA-ATTENTION-NEEDED Maintainers need to pay additional attention to reviewing this pr label Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@src-opn src-opn left a comment

Choose a reason for hiding this comment

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

Requesting changes.

Code issue:

  • apps/app/src/react-app/domains/settings/state/messaging-view-state.ts:826: the polling effect depends on refreshAll, but refreshAll depends on state that it mutates (refreshing, messagingEnabled, agent state) and the effect immediately calls refreshAll({ force: true }). Each refresh can change the callback identity, re-run the effect, clear/recreate the interval, and immediately start another forced refresh instead of waiting for the 10s poll. On a connected settings page this can turn into a continuous config/router/file refresh loop. Please make the polling effect stable so refresh state changes do not retrigger an immediate forced refresh.

Verification run:

  • pnpm install --frozen-lockfile passed.
  • pnpm --filter @openwork/app typecheck passed.
  • pnpm --filter @openwork/app build passed, with the existing large chunk warning.
  • pnpm --filter @openwork/app test:health passed.

…t-autoheal

# Conflicts:
#	apps/app/src/react-app/shell/settings-route.tsx
@pascalandr
Copy link
Copy Markdown
Contributor Author

Stabilized the messaging refresh poll so state changes no longer retrigger immediate forced refreshes.

@src-opn src-opn merged commit e0f0981 into different-ai:dev May 4, 2026
8 of 13 checks passed
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
* fix(messaging): auto-heal missing router agent file

* fix(messaging): restart the router for messaging recovery
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
* fix(messaging): auto-heal missing router agent file

* fix(messaging): restart the router for messaging recovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EXTRA-ATTENTION-NEEDED Maintainers need to pay additional attention to reviewing this pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SlackBot not properly stabilizing connection to workspace

2 participants