Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

fix(channels): preserve loop back destination - #3850

Closed
puemos wants to merge 12 commits into
mainfrom
posthog-code/channel-loop-back-navigation
Closed

fix(channels): preserve loop back destination#3850
puemos wants to merge 12 commits into
mainfrom
posthog-code/channel-loop-back-navigation

Conversation

@puemos

@puemos puemos commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Opening a loop from a channel’s Loops surface lost its entry context, so the in-page Back action returned to the global Loops list.

Why: Navigation should return users to the list they came from while keeping global and direct loop visits global.

Changes

Carry an explicit channel return target through channel-scoped create, detail, edit, cancel, delete, and back navigation. The target is supplied only by channel entry points and is never inferred from loop attachment.

How did you test this?

  • pnpm --filter @posthog/ui exec vitest run src/router/navigationBridge.loops.test.ts src/features/loops/loopNavigation.test.ts
  • pnpm --filter @posthog/ui typecheck
  • pnpm exec biome check --write <changed files>

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/loops/components/LoopForm.tsx

Reviewed by React Doctor for commit 94aa54b.

@posthog

posthog Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

👋 Visual changes detected for this PR.

Review and approve in PostHog Visual Review

If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix.

puemos and others added 11 commits July 27, 2026 20:44
Extract the task thread conversation behavior and PR artifact presentation used by existing channel surfaces. This is behavior-neutral groundwork for the structured Activity view.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Add the dormant channel identity, item-list, and task-routing foundations with flag definitions and project-safe cleanup. Visible layout activation remains upstack.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Activate the complete channel-scoped sidebar, switcher, navigation, shortcuts, and shell chrome behind the spaces flag. The existing Thread panel remains in place until the next stack PR.

Generated-By: PostHog Code
Task-Id: 6190e713-9b80-43d9-a05c-5e3b1ecdf297
Replaces the channel switcher popover with a master/detail sidebar. The list
pane (searchable, #me pinned, then starred, then the rest) slides aside when
you open a channel; the channel pane is headed by a row that slides back.

Which pane shows is view state (`channelPaneStore`), separate from the scoped
channel: going back to the list browses without leaving the channel. Both
panes stay mounted, the offscreen one inert.

Generated-By: PostHog Code
Task-Id: 1932f1b0-a072-4de2-a21d-6455e6c445ee
- Drop the back row's border; it's a sidebar row, not a control on top of one.
- One FAB on both panes: with a channel it creates a task or canvas inside it,
  and either way it can create a channel.
- Tighten the gap between the global nav and the pane below it.
- Move Archived out of the sidebar and into the account menu, beside Settings.
- Gate the list's search and ⌘1-9 hints on the layout flag, so the alpha's
  channel tree is untouched.

Generated-By: PostHog Code
Task-Id: 1932f1b0-a072-4de2-a21d-6455e6c445ee
The channel sidebar's recent/pinned rows showed no sign that a task was still
working — run status only appeared as a badge in the hover preview card, so a
running task looked identical to a finished one while scanning the list.

Sweep a highlight band across the row's icon instead of swapping in a spinner.
Keeping the glyph means a running task still reads as a task and a running
canvas as a canvas, so the list stays scannable by kind while it moves.

The animation masks rather than recolours, so unlike the neighbouring ph-pulse
it repaints nothing per frame. Reduced motion holds a dimmed glyph rather than
dropping the signal, and the existing ph-window-blurred rule parks it when the
window loses focus.

Generated-By: PostHog Code
Task-Id: 1ee0ef0c-17af-4e55-b0ae-b036cd38eafc
Use Spaces terminology throughout the flag-gated layout while preserving the legacy Channels copy and all internal channel contracts.

Generated-By: PostHog Code
Task-Id: 346a07ca-892e-4431-90aa-16be9aa4cbdc
12 updated, 12 removed
Run: 80273ad3-5999-4857-888c-48ea24ff260f

Co-authored-by: puemos <13174025+puemos@users.noreply.github.com>
@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from 8a9e6f2 to 8bda314 Compare July 27, 2026 18:45
Carry an explicit channel return target through channel-scoped loop detail, edit, and create flows while leaving global and direct loop navigation unchanged.

Generated-By: PostHog Code
Task-Id: 56aedb76-e03e-42b0-a30a-b23f39777aa2
@puemos
puemos force-pushed the posthog-code/channel-loop-back-navigation branch from c66179e to 94aa54b Compare July 27, 2026 18:52
@puemos
puemos force-pushed the posthog-code/channels-stack-3-spaces-ui branch from 8bda314 to 21c9bce Compare July 28, 2026 10:01
Base automatically changed from posthog-code/channels-stack-3-spaces-ui to main July 28, 2026 10:34
@trunk-io

trunk-io Bot commented Jul 28, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@puemos puemos closed this Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant