Skip to content

Cmd+K message search and open ranking for people a thread is shared with #696

Closed

Description

@Jacksondr5

Problem

Upstream rebuilt Cmd+K (pingdotgg#24343). It now has an "In messages" section backed by full-text search over the server call orchestration.searchThreads, and it ranks threads by an opens record kept on each thread: an open count, plus the last three palette queries that picked the thread.

Two things follow for people a thread is shared with (Viewer, Collaborator):

  • They get no message search. J5's narrowed connections refuse any RPC that hasn't been reviewed (apps/server/src/j5/wsRpcScopes.ts), so searchThreads is refused. Title search still works because it runs on the client.
  • opens is one record shared by everyone. It isn't per person, so one person's opens and queries shape another's ranking.

At the 2026-10-24 upstream advance, J5 strips opens from what a narrowed connection receives, so the Owner's recent queries don't reach the people they share with (Jackson, 2026-10-24). Message search stays off for narrowed connections until this issue is done.

To decide and build

  • Message search for narrowed connections. Search should return only threads and messages the person reaches, at their level. Decide whether to filter upstream's results or to scope the query.
  • Whose opens count. Should a narrowed person's thread.visit update the shared opens record at all? The options are: count them, ignore them for ranking, or keep opens per person, which would be a divergence.

Activity

  1. Jacksondr5 commented on Oct 27, 2026

    @Jacksondr5
    OwnerAuthor

    Finding from the v0.1.3 merge (2026-10-27): opens still reaches shared people through the thread view

    The advance (#705) strips the thread's opens record from the sidebar a narrowed connection receives (GuestView reduceThread, decision 6). The thread-detail stream is not covered. subscribeThread is allowed for a Viewer through AccessGate (onThread("viewer")), and ws.ts passes the full thread through unchanged: opens (the Owner's last three Cmd+K queries for that thread), worktreePath, and upstream's new guestShare, both in the snapshot and in every thread.* event.

    guestShare is always null in J5, because guest links are hidden and the server refuses without T3 Connect. opens does reach a Viewer who opens the thread.

    To close the gap, strip opens (and guestShare, as a precaution) from the detail stream for narrowed connections. That needs a view hook beside shellStream, a seam in ws.ts, and a FORK.md row. Being fixed in #705 instead, since decision 6 asked for it; this comment stays as the record.

  2. Jacksondr5 commented on Oct 28, 2026

    @Jacksondr5
    OwnerAuthor

    Confirmed at #705's head (6cb5c51571): opens and guestShare are now stripped for narrowed connections in the sidebar, the thread-detail stream and thread loads (FORK.md case 69). What's left here is the two open questions above: message search for shared people, and whose opens count.

    Claude Opus 5.5

  3. Jacksondr5 commented on Oct 31, 2026

    @Jacksondr5
    OwnerAuthor

    Decided (Jackson, 2026-10-31)

    • Message search for people a thread is shared with: scope the search on the server to the threads the person can open, at their level. Don't filter upstream's results afterwards, because the search caps its results before any filter would run.
    • Whose opens count: a narrowed connection's visits and Cmd+K queries don't change the thread's shared opens record. No per-person opens.

    Claude Opus 5.5

  4. added a commit that references this issue on Oct 31, 2026
    75cd4da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions