Skip to content

Commit f88dd97

Browse files
committed
fix(channels): treat channel task-detail route as task-detail view
deriveFromMatches only mapped /code/tasks/$taskId to "task-detail", so archiving a task while viewing it at /website/$channelId/tasks/$taskId left the stale detail in the main pane — navigateAwayFromTaskIfActive never fired. Map the channels-space task route to the same view. Generated-By: PostHog Code Task-Id: b3d24fd9-abfb-42b8-9efb-f83760f0d3f1
1 parent 6ba2a1c commit f88dd97

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/ui/src/router/useAppView.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function deriveFromMatches(matches: Match[]): AppView {
4040
if (!last) return { type: "task-input" };
4141

4242
switch (last.routeId) {
43-
case "/code/tasks/$taskId": {
43+
// Both the /code task detail and the channels-space task detail render the
44+
// same task-detail view, so consumers (active-state highlighting, archive's
45+
// navigate-away-if-active check) treat them identically.
46+
case "/code/tasks/$taskId":
47+
case "/website/$channelId/tasks/$taskId": {
4448
const taskId = last.params.taskId;
4549
if (!taskId) return { type: "task-input" };
4650
// Intentionally no `data` snapshot: consumers read live task state via

0 commit comments

Comments
 (0)