Skip to content

fix(desktop): keep the create button in the nav rail - #97076

Open
rubychilds wants to merge 3 commits into
masterfrom
posthog/desktop-new-task-when-sidebar-collapsed
Open

rubychilds wants to merge 3 commits into
masterfrom
posthog/desktop-new-task-when-sidebar-collapsed

Conversation

@rubychilds

@rubychilds rubychilds commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem

  • Collapsing the desktop sidebar (⌘B) hides the orange create button, the last mouse route to a new task.
  • Destinations that draw no sidebar, such as Home and Inbox, lose it the same way.

Changes

See Loom

  • The orange create button now lives in the nav rail, above Search, on every destination. It still files a task into the space you are in.

    rail-create

  • The floating copies over the space pane and the spaces list are gone, so there is one create button.

  • The Spaces heading gains a "+" for a new space, shown on hover like a row's own controls.

    spaces-heading-plus

  • Off the spaces layout nothing changes: that sidebar has no rail and keeps its floating button.

How did you test this code?

  • NavRail tests check the button sits above Search on Home, Spaces and Inbox, and carries the current space.
  • ChannelsList tests check the heading "+" opens the create dialog on the spaces layout only.
  • Checked in the dev app with the sidebar open, collapsed, and on the spaces list.

🤖 Agent context

  • Claude Code (Fable 5.1) wrote the change with the author directing each step. Skills: writing-pr-descriptions.

Created with PostHog from a Slack thread

The sidebar holds every create affordance: the floating "+" and the "New task" row. Collapsing the sidebar, or landing on a destination that draws no sidebar, leaves the keyboard shortcut as the only way to start a task.

Show a "New task" button in the title bar beside the sidebar toggle whenever the sidebar body is off screen. It files into the scoped channel, the same as the shortcut and the sidebar "+".

Generated-By: PostHog Desktop
Task-Id: ae645e0e-1651-4060-b869-5e751f874793
@rubychilds rubychilds self-assigned this Sep 9, 2026
@trunk-io

trunk-io Bot commented Sep 9, 2026

Copy link
Copy Markdown

Merging to master 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

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 57a331e.

@github-actions github-actions Bot added the feature/desktop Feature Tag: Desktop label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

Trunk lane — non-backend lane (fe:product:desktop)

This PR is assigned to the non-backend lane (fe:product:desktop). It does not run backend Python tests and may merge in parallel with PRs in other lanes.

🚨 Comment density — 20% of added code lines are comments (35 of 179)

This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.

Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.

Files with the most added comment lines:

File Comment lines Added lines
products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx 21 80
products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx 5 24
products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx 5 12
products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx 2 15
products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx 2 48

This check does not block merging. It updates on every push and clears when the share drops.

@hosthog

hosthog Bot commented Sep 9, 2026

Copy link
Copy Markdown

HostHog preview — posthog-desktop-web

Latest build (57a331e): https://fae06acbd96647dab1bf2c3e877cc290.hosthog.dev

Earlier builds of this PR, still serving:

Employee-gated; every push gets a fresh URL whose content never changes. All previews stop serving when the PR closes.

@rubychilds rubychilds changed the title fix(desktop): keep a new task button when the sidebar collapses fix(desktop): keep the create button in the nav rail Sep 12, 2026
The orange create button lived only in the sidebar, so collapsing the
sidebar took away the last mouse route to a new task. It now sits in the
nav rail above Search on every destination, the floating copies in the
space pane and the spaces list are gone, and the Spaces heading gets a
"+" for a new space.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@rubychilds
rubychilds marked this pull request as ready for review September 12, 2026 01:24
@rubychilds
rubychilds requested a review from a team September 12, 2026 01:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57a331e665

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +323 to +325
<ChannelsFab
channelId={currentChannelId ?? undefined}
placement="rail"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep New space available while filtering Spaces

When the Spaces search query is nonempty and a channel is scoped, this prop makes the rail FAB direct-only because ChannelsFab treats a channelId as "New task", while NewSpaceButton is only rendered in the unfiltered normalizedQuery ? ... : ... branch of ChannelsList.tsx. The previous list FAB had no channelId and retained its New space menu, so users now have to clear their search before they can create a space. Keep a New space action in the filtered state or expose it from the rail menu.

Useful? React with 👍 / 👎.

// Off the layout, bottom padding clears the floating create button
// (ChannelsFab) so the last channel stays reachable at full scroll. The
// layout keeps that button in the rail, so the list needs no room for it.
const scrollClass = `scroll-mask-8 min-h-0 flex-1 overflow-y-auto px-2 pt-2 ${channelsLayout ? "pb-2" : "pb-16"}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the forced bottom spacer from Spaces

On the Spaces layout, scrollClass now supplies pb-2, but the same list still has the existing !pb-16 class. The important Tailwind utility wins, leaving the former floating-button clearance (4rem) as dead space at the bottom of the list even though the FAB was moved to the rail. Make the important padding conditional or remove it for the Spaces layout.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/desktop Feature Tag: Desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant