Skip to content

Feature: quick content-type filter in the Paste Bar #114

Closed

Description

@maximdx

Problem

The Paste Bar can currently be narrowed only by pinboard source and free-text search. ClipboardStore.visibleItems depends on those two signals alone, and ClipType is only used to classify and style cards — there is no way to show just one kind of clip.

That matters most when you remember what kind of thing you copied but none of its text:

  • Image clips have no searchable text at all, so search cannot find them.
  • Typing image or file does not filter by kind; it is a plain substring match over text / custom title / source app name / file URL / color hex.
  • File clips are findable by file name/extension and colors by hex, but that is still text matching, not type filtering.
  • History is a mixed horizontal strip, so scanning for a screenshot or a file means scrolling past unrelated text clips.

Proposal

Add an always-visible row of filter chips directly under the bar's top chrome:

All Types · Text · Rich Text · Link · Image · File · Color

  • Single-select: clicking a type narrows the strip; clicking the selected type again (or All Types) returns to the full list.
  • Types the current collection does not contain are visibly disabled, so a filter cannot be selected into a dead end. The selected type stays enabled even if its last clip is deleted while filtering.
  • Filtering composes with pinboards and search, in the order source → type → query. Quick-paste numbering (⌘1–⌘9) follows the filtered list.
  • Keyboard: ⌘⇧F cycles through All Types and the types present in the current collection; Esc clears in the order selection → search → filter → close. Add a "Cycle Type Filter" item to the overflow menu for discoverability.
  • The filter resets each time the bar opens, the same contract the search query already follows.
  • Empty states stay truthful for all four combinations (empty collection / filter only / search only / filter + search) and offer a recovery action when a filter is active.
  • Accessibility: labelled chips, selected state, and hints (including why a type is disabled).

Scope / notes

  • This filters by the existing content-type buckets (ClipType), not by file extension or UTI. Image means copied image data; a Finder-copied image file is recorded as File — worth surfacing in tooltips/docs.
  • Adding a chrome row means the bar's minimum height should go from 300 pt to 330 pt so a compact bar still fits a File card, and the Settings slider should derive its range from the same geometry constants instead of hard-coding 300...720.

Implementation sketch

  • Extract filtering/counting/cycling rules into a pure ClipFilter helper with unit tests.
  • Add typeFilter: ClipType? to ClipboardStore, applied in visibleItems and reset on presentation.
  • Add a ClipTypeFilterBar view between the top chrome and the strip.
  • Wire ⌘⇧F and the new Esc ordering in AppController.
  • Update README.md, CHANGELOG.md, and docs/llms.txt.

Activity

  1. maximdx commented on Nov 8, 2026

    @maximdx
    ContributorAuthor

    Opened PR #115 — "Add a quick content-type filter to the Paste Bar": #115

    It implements the chip row (All Types + the six clip types), source → type → search composition, ⌘⇧F cycling, the new Esc ordering, truthful empty states with a recovery action, accessible chips, and the 330 pt minimum height needed for the new chrome row. Tests: swift test — 20/20 passing (13 new ClipFilter tests).

  2. added a commit that references this issue on Nov 19, 2026
    29d6db8
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions