Skip to content

feat: add pinned chats - #59

Open
mshykhov wants to merge 12 commits into
gronxb:mainfrom
mshykhov:feat/pinned-chats
Open

feat: add pinned chats#59
mshykhov wants to merge 12 commits into
gronxb:mainfrom
mshykhov:feat/pinned-chats

Conversation

@mshykhov

@mshykhov mshykhov commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • add Pin chat / Unpin chat to the existing chat actions sheet
  • render pinned chats once in a dedicated section above project groups
  • persist pinned thread IDs locally so pins survive app restarts
  • show the workspace leaf folder and relative activity time on pinned rows

Behavior

  • newly pinned chats are placed first; repeated pin/unpin operations are idempotent
  • pinned chats are removed from their normal project group to avoid duplicate rows
  • search keeps the existing flat project results and does not render a separate pinned section
  • duplicate and missing persisted thread IDs are ignored safely
  • archiving a chat also removes its pinned state after a successful archive
  • only the final workspace folder is displayed; long metadata stays on one line with middle ellipsis
  • pin state is device-local and is not synced through the Relay server

Implementation

  • pinned-thread-store.ts uses the existing Legend State persistence helper
  • thread-drawer-rows.ts builds stable, unique drawer rows and preserves collapsed-project behavior
  • ThreadDrawerContent.tsx composes the existing bottom sheet action and renders pinned metadata
  • focused tests cover persistence, ordering, duplicate IDs, search behavior, active rows, and workspace labels

Screenshots

Pin action Unpin action Pinned after cold restart
Pin chat action in the Android bottom sheet Unpin chat action in the Android bottom sheet Pinned chat section after Android app relaunch

Validation

  • corepack pnpm --filter codex-relay test - 290 passed, 4 skipped
  • corepack pnpm -r typecheck
  • corepack pnpm exec oxlint apps packages --import-plugin --react-plugin --jsx-a11y-plugin --vitest-plugin
  • corepack pnpm exec oxfmt . --check
  • Android emulator: pin, unpin, workspace label, and persistence after a cold restart
  • GitHub CI: Lint, format, and typecheck passed

Release

  • adds a patch changeset for @codex-relay/mobile

Closes #58

Out of scope

  • collapsing and expanding the Pinned section; it stays visible whenever pinned chats exist and can be added as a focused follow-up

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aaca3b0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@codex-relay/mobile Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add pinned chats

1 participant