Skip to content

Phone: the left drawer chooses the view and manages Hosts; first run pairs by account or Tailscale #2517

Open
3 of 3 issues completed

Description

@DoodleBears

Requested by Vain · project thread

Part of #2500. Spec from grill-with-docs round 4 (ADR-0243, "No environment tabs"). The desktop half is #2508.

Problem Statement

On the phone, the Chats screen has environment tabs (All, this Host, each cloud workspace) and a sideways pager. The tabs take vertical space, and the sideways swipe is taken, so chat rows can't get swipe actions. Pairing is split: the drawer, the first-run redirect, and the account sign-in each start pairing in a different way, and iOS and Android did not match on first run.

Solution

  • One place for views and Hosts. The left drawer is the only place to choose what the Chats list shows and to manage Hosts.
    • The drawer lists 全部 / All first, then the Hosts and the cloud workspaces.
    • Picking All shows every chat. Picking a Host shows only that Host's chats.
    • Adding, pairing, customizing and removing Hosts all live in the drawer.
  • Opening the drawer. On iOS, swipe in from the left edge. On Android, and on iOS too, tap the Chats title at the top left.
  • No tabs, no pager. The Chats screen is one list. The title shows the chosen view: All shows a chat icon in the default accent colour; a Host shows its own icon in its colour.
  • Android accent. On Android only, choosing a Host that has a colour makes the whole app accent follow that colour. All, or a Host without a colour, keeps the default accent.
  • One pairing flow. The drawer's "pair" action and first run open the same chooser:
    • Sign in with a DeepSeekBot account: list that account's computers and pair one.
    • Use Tailscale: scan a QR code or paste a pairing link.
  • First run. A phone with no Host opens the chooser by itself and shows an empty home behind it.
  • Swipe actions. With the pager gone, swiping a chat row reveals actions: pin, add to a channel section, and mute.

User Stories

  1. As a phone user, I want the Chats screen to show one list without tabs, so that I see more chats.
  2. As a phone user, I want to open the left drawer by swiping in from the left edge on iOS, so that switching views is one gesture.
  3. As an Android user, I want to open the left drawer by tapping the Chats title, so that I don't fight the system back gesture.
  4. As a phone user, I want All at the top of the drawer, so that I can see every chat at once.
  5. As a phone user, I want to pick a Host in the drawer to see only that Host's chats, so that I can focus on one computer.
  6. As a phone user, I want the drawer to mark the view I am looking at, so that I know what the list shows.
  7. As a phone user, I want the Chats title to show the chosen Host's name and icon, so that I know which view I am in without opening the drawer.
  8. As a phone user, I want the title icon to use the Host's colour, so that each Host is recognizable at a glance.
  9. As an Android user, I want the app accent to follow the chosen Host's colour, so that the whole screen tells me which Host I am in.
  10. As an Android user, I want All to use the default accent, so that the combined view looks neutral.
  11. As a phone user, I want my last chosen view to be remembered, so that reopening the app shows the same list.
  12. As a phone user, I want a view that no longer exists, such as an unpaired Host, to fall back to All, so that I never see an empty list by mistake.
  13. As a phone user, I want to pair a new Host from the drawer, so that adding Hosts lives in one place.
  14. As a phone user, I want pairing to offer "Sign in with a DeepSeekBot account" and "Use Tailscale", so that I can use whichever I have.
  15. As a signed-in user, I want the drawer to list my account's computers, so that I can pair one with a tap.
  16. As a Tailscale user, I want the scanner and the link field only on the Tailscale page, so that the account path stays simple.
  17. As a new user with no Host, I want the pairing chooser to open by itself, so that I know what to do first.
  18. As a new user, I want iOS and Android to show the same first-run flow, so that guides and support match.
  19. As a phone user, I want to customize a Host's icon, colour and name from the drawer, so that looks are managed where Hosts are.
  20. As a phone user, I want to unpair a Host from the drawer, with a confirmation, so that I can remove it safely.
  21. As a phone user, I want to see each Host's online status and unread or needs-you count in the drawer, so that I know where attention is needed.
  22. As a phone user, I want to swipe a chat row to pin it, so that important chats stay on top.
  23. As a phone user, I want to swipe a chat row to add it to a channel section, so that I can organize chats quickly.
  24. As a phone user, I want to swipe a chat row to mute it, so that noisy chats stop alerting me.
  25. As a VoiceOver or TalkBack user, I want every swipe action also in the row's actions menu, so that I can reach them without gestures.
  26. As a large-text user, I want the drawer rows and the Chats title to wrap rather than clip, so that names stay readable.

Implementation Decisions

  • View state. The selected view stays in the existing device-local conversation filter store. Its keys are all, a Host key, or a cloud workspace key. The drawer writes it and the Chats screen reads it. No new storage.
  • Chats screen. Drop the environment pager and render one list filtered by the selected view. The header receives the selected environment and draws its icon and title.
  • Drawer. Add an All row above the Host list. Picking a Host switches the session to that Host, then sets the filter to that Host. Picking All sets the filter to all and leaves a cloud screen if one is open.
  • Android accent. A root-level provider reads the filter, the current Host and its look, and feeds the Host colour into the existing accent provider on Android only. Contrast is handled by the existing accent resolution.
  • Pairing. /pair is the single entry point (the chooser with account and Tailscale pages). The drawer's pair action and first run both open it. Account deep links and pasted links forward to the right page.
  • Host looks. Looks stay device-local (ADR-0243). A newly paired Host gets an unused symbol and colour, as on the desktop.
  • Swipe actions. They reuse the existing row actions (pin, section, mute) and their Host calls. The swipe is only a new way to trigger them.
  • Words. Use This Host, Remote Host, Paired Device and Host from CONTEXT.md. The Chinese UI says 本机 / 远程, never 电脑.

Testing Decisions

  • Test external behaviour through the highest seam: render the Chats screen with mocked Host session, cloud and filter stores, change the filter, and assert the rows and the title. This follows home-search.test.tsx.
  • Drawer model behaviour (select, pair, notifications) stays in host-drawer.test.ts. The All row and Host selection are covered by asserting the filter value after a press.
  • The pairing chooser has its own screen test (pair-choice.test.tsx in feat(mobile): pair by account or Tailscale from a choice sheet; hide cloud Channels behind a flag #2512): the two options, the routes they push, and the forwarded p / account params.
  • Swipe actions: assert that each action calls the same Host operation as the existing menu action. Native gesture feel is checked on devices.
  • Native QA on an iPhone and an Android phone is required for each slice, following apps/mobile/DESIGN.md (light and dark, large text).

Out of Scope

Further Notes

Existing work, not duplicated as sub-issues:

Slices are attached below as sub-issues.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:channelChannel chat, timeline, composer, and navigationready-for-agentFully specified, ready for an AFK agentscope:hubParent coordination map or epic; not a standalone implementation slice

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions