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:
@@ -1,4 +1,5 @@
|
||||
import { Buffer } from "buffer";
|
||||
import { buildAgentDeepLinkRoute } from "@getpaseo/protocol/agent-deep-link";
|
||||
|
||||
type NullableString = string | null | undefined;
|
||||
const BASE64_WORKSPACE_ID_PREFIX = "b64_";
|
||||
@@ -389,7 +390,10 @@ export function buildHostAgentDetailRoute(serverId: string, agentId: string, wor
|
||||
if (!normalizedServerId || !normalizedAgentId) {
|
||||
return "/" as const;
|
||||
}
|
||||
return `${buildHostRootRoute(normalizedServerId)}/agent/${encodeSegment(normalizedAgentId)}` as const;
|
||||
return buildAgentDeepLinkRoute({
|
||||
serverId: normalizedServerId,
|
||||
agentId: normalizedAgentId,
|
||||
});
|
||||
}
|
||||
|
||||
export function buildHostRootRoute(serverId: string) {
|
||||
|
||||
Reference in New Issue
Block a user