Omniscio

Channel bookmarks — the links bar under a Team Chat conversation header

Every conversation has a place for the links a team keeps needing. The slim bar sits directly under the conversation header, in the same place Slack puts its channel bookmarks. - Add a bookmark — press Add a bookmark on the bar, paste a link and optionally name it. The name falls back to the site and path of the link, so an unnamed bookmark still reads well. - Open one — press its name and it opens in your browser. - Remove one — press the small × on the chip. It is removed for everyone in the channel. - Pinned messages — when the channel has pins, a Pinned · N chip sits first in the row. Press it to see the pinned messages and jump to one. - Nothing saved yet — the bar shows only the small Add a bookmark affordance, so it stays quiet on a brand-new channel.

On this page

Where it lives

The bar is part of the conversation header component (TeamChatChannelHeader.tsx) and renders only on the desktop layout; the phone layout is unchanged for now. It draws nothing else and never removes a header action — the header's own controls and its More menu are untouched, in line with the header action pins contract.

How the bookmarks are stored

  • Shared per channel, not per person. A bookmark is a document at channels/{channelId}/bookmarks/{bookmarkId} carrying { title, url, createdBy, createdAt }. The id is generated when the bookmark is added; createdBy is stamped to the person adding it and createdAt to the server clock, both enforced by the Firestore rule, so a client can never forge an author or back-date an entry.
  • Immutable. There is no update path — a Firestore rule denies it. Changing a bookmark means removing it and adding it again, which keeps the shared list honest.
  • Membership-checked. Read, create and delete each require membership of that channel, on both tenant roots (the company organisation and self-serve chat workspaces), and a soft-deleted workspace denies them all. A private channel's bookmarks are invisible to everyone outside it.
  • Only http and https links are accepted, in the form and again in the rule, so a javascript: or data: address can never be stored or clicked.
  • Capped. A channel holds at most CHANNEL_BOOKMARK_CAP bookmarks (item-caps.ts); at the cap the add affordance disables and explains that one has to be removed first, instead of letting the write fail in Firestore.
  • One listener per open conversation. The bar mirrors the channel's bookmarks collection with a single bounded subscription that detaches on switch, exactly like the pins listener.

The Pinned chip

The brief for this bar asked for pinned messages to appear on it. The chip shows the channel's pin count and opens a compact list built from the same pure helper the pinned bar uses (pinned-messages.ts), so both surfaces resolve, order and preview a pin identically. Picking a row jumps the conversation to that message through the same pending-jump-target path the pinned bar uses. The channel's own pinned bar, directly below the bar, is unchanged and still offers unpin.

For Go-live

The patch carries a Firestore rules hunk — a bookmarks match block plus a bookmarkDocBounded() helper, for both the organizations/{orgId} and chatWorkspaces/{wsId} channel scopes in firestore.rules. Nothing works until those rules are deployed by the Go-live lane; the renderer is already shipped but every read and write will be denied until then. No Cloud Function and no index is required — a bookmarks write is a single-document setDoc and the listener reads a top-level subcollection with no ordering.

Last verified 2026-11-20