Fix notifications opening the wrong workspace (#2331)
* fix(app): open notifications on the right host Agent notifications previously omitted workspace ownership, so a cold target host was treated as missing and fell back to its empty home route. Carry the authoritative workspace and keep older notifications on a target-host resolver until lookup is conclusive. * fix(app): separate notification and agent URL routing Notifications use their authoritative workspace target directly. Stable agent URLs remain server-and-agent targets whose workspace is resolved by the agent route. * fix(protocol): preserve notification workspace targets Both attention message variants retain workspaceId through outbound validation so notification clicks receive the authoritative route target. * test(app): use workspace-scoped notification target * test(server): give notification agents workspace targets * test(app): target notification workspace in navigation e2e
This commit is contained in:
@@ -5,6 +5,7 @@ export type AgentAttentionReason = "finished" | "error" | "permission";
|
||||
export interface AgentAttentionNotificationData {
|
||||
[key: string]: unknown;
|
||||
serverId: string;
|
||||
workspaceId?: string;
|
||||
agentId: string;
|
||||
reason: AgentAttentionReason;
|
||||
}
|
||||
@@ -18,6 +19,7 @@ export interface AgentAttentionNotificationPayload {
|
||||
interface BuildAgentAttentionNotificationPayloadInput {
|
||||
reason: AgentAttentionReason;
|
||||
serverId: string;
|
||||
workspaceId: string;
|
||||
agentId: string;
|
||||
assistantMessage?: string | null;
|
||||
permissionRequest?: NotificationPermissionRequest | null;
|
||||
@@ -203,6 +205,7 @@ export function buildAgentAttentionNotificationPayload(
|
||||
body,
|
||||
data: {
|
||||
serverId: input.serverId,
|
||||
workspaceId: input.workspaceId,
|
||||
agentId: input.agentId,
|
||||
reason: input.reason,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user