Repository navigation
Fix arbiter appeal page auth and chat session creation - #781
Conversation
- Send explicit authorize:'arbiter' on arbiter appeal and chat API calls so companion requests no longer fall through to the peer user type and return 401 - Refetch appeal data on the relogged event so the page leaves the skeleton state - Create the chat session in ChatDialog when fetchChatSession resolves null, instead of relying on a rejection that never fires
- Switch model to opencode/glm-5.3: opencode zen's POST /zen/v1/chat/completions returns 404 "Cannot find any route matching" for kimi-k2.6, while glm-5.3 routes successfully - Grant issues: write so the action can create comments and reactions - Mirrors the proven fix in engagement-hub
PR #781 Review — Fix arbiter appeal page auth and chat session creationRoot-cause analysis verified1. Auth classification ( 2. Component usage scoping — All hard coded components (AppealDetail, AppealFeedbackDialog, AppealTransfer, OrderStatusDialog, TransactionHistoryDialog) are imported only by the arbiter 3. Chat session dead code — Confirmed 4. 5. Lint — Ran ESLint on the 7 touched files on both base and PR branch: identical results, all pre-existing. Confirms the PR claim. Security review (per AGENTS.md)No changes to entropy, key derivation, signing, transaction construction, or secret storage. The diff only affects which stored token (peer vs arbiter) is attached to watchtower REST calls, and the scoping is verifiably correct (arbiter-only components). No secrets logged, no new endpoints, no new dependencies. The workflow change ( Minor findings (non-blocking)
VerdictThe changes are correct, well-scoped, and the root-cause analysis in the PR body checks out against the code. Approve — the minor findings above are worth a follow-up but none block this fix. |

Summary
Opening an arbiter appeal deep-link (e.g.
#/apps/exchange/arbiter/appeals/1802/) produced401 No auth credentials providederrors and left the page on skeleton loaders forever. Opening the chat tab then produced 404/400 errors and never loaded messages.Also fixes the opencode GitHub workflow, which failed with
404 Cannot find any route matching [POST] https://opencode.ai/zen/v1/chat/completions.Changes
authorize: true.resolveRequestUserTypeonly classifies URLs matching a small arbiter pattern set, so these fell through toramp/getUser(empty on arbiter deep-links) and defaulted topeer, sending no/peer token. They now passauthorize: 'arbiter', matching the already-correctfetchAppeal.appeal.vuenow listens for thereloggedbus event and reloads, so the page recovers after a silent arbiter re-login instead of staying on the skeleton.fetchChatSessionresolvesnullon 404 rather than rejecting, butChatDialogonly setcreateSession = trueinside.catch()— dead code. Absence is now detected from the resolved value, socreateChatSession/updateChatMembersactually run.opencode/kimi-k2.6->opencode/glm-5.3(Kimi 404s on the zen chat-completions route; GLM routes) and grantissues: writeso the action can comment/react. Mirrors the proven fix in engagement-hub.Notes
src/pages/apps/exchange/peer_to_peer/order.vue:2012has the same dead-code pattern for the peer-side fallback; left out of this PR to keep the scope on the reported arbiter bug.