Skip to content

Support from:me in post search - #703

Merged
dahlia merged 1 commit into
fedify-dev:mainfrom
dahlia:feat-search-from-me
Nov 20, 2026
Merged

dahlia merged 1 commit into
fedify-dev:mainfrom
dahlia:feat-search-from-me

Conversation

@dahlia

@dahlia dahlia commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Searching by a bare username can match accounts on multiple servers. Use from:me has:media to find your own posts with media without typing your full handle.

Hollo recognizes the exact value me before stripping a leading @ and matches the post author by the authenticated account ID. Searches for from:@me or from:me@example.com still match the literal username or handle. Use from:@me if you previously used from:me to search for accounts named me. No new quoting syntax is needed.

OpenCode assisted with implementation, tests, documentation, and this description. Antigravity, Claude Code, and Codex assisted with review.

Fixes #702.

@dahlia dahlia added the enhancement New feature or request label Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The search syntax adds from:me for posts authored by the signed-in account. The API passes the account ID to the search filter builder. Parser and filter tests cover literal values, combined filters, negation, and missing account IDs. Search guides and changelogs describe the syntax.

Changes: Authenticated account search

Layer / File(s) Summary
Operator syntax and parsing
src/search/types.ts, src/search/parser.ts, src/search/index.ts, src/search/parser.test.ts
Adds the fromMe operator. The parser recognizes from:me while keeping forms such as from:@me as literal values. Parser tests cover case handling, negation, and literal values.
Account-aware filter construction
src/search/builder.ts, src/api/v2/index.ts, src/search/builder.test.ts, src/api/v2/search.test.ts
Passes the authenticated account ID through filter construction and matches it against the post’s account ID. The builder throws from:me requires an authenticated account ID when the ID is missing. Tests cover request accounts, combined filters, and account_id behavior.
Search guides and changelog
docs/src/content/docs/*/search.md, CHANGES.md, changes.d/search-from-me.md
Documents from:me, distinguishes it from from:@me, and updates the mentions:username description to specify username or full-handle matching.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: Minimal · up to 98c22

This adds from:me search for the signed-in account and keeps from:@me and from:me@example.com as literal matches. I found no merge-blocking risk in the changes reviewed.

Pre-merge checks: Passed 4

Check name Status Explanation
Description check Passed The description states that bare-username searches can match accounts on multiple servers and explains the new from:me behavior. It also covers from:@me and from:me@example.com handling and references…
Linked Issues check Passed Directly linked issue #702 requires: (1) from:me matches the author by authenticated account ID; (2) existing post visibility rules remain; (3) from:@me and from:me@example.com keep their litera…
Out of Scope Changes check Passed The changes fall into these groups:
- Search core (src/search/builder.ts, parser.ts, types.ts, index.ts) and the status search call in src/api/v2/index.ts: directly implement #702.
- Tests (…
Title check Passed The title "Support from:me in post search" matches the main change. The PR adds a from:me operator that resolves to the authenticated account ID, and the parser, builder, types, and tests all impl…
Full details: Description check

Explanation

The description states that bare-username searches can match accounts on multiple servers and explains the new from:me behavior. It also covers from:@me and from:me@example.com handling and references issue #702. It is directly related to the changeset.

Full details: Linked Issues check

Explanation

Directly linked issue #702 requires: (1) from:me matches the author by authenticated account ID; (2) existing post visibility rules remain; (3) from:@me and from:me@example.com keep their literal-match behavior; (4) from:"me" is excluded.

Evidence:

  • Requirement 1: At head, src/search/builder.ts handles the fromMe operator by returning eq(table.accountId, viewerAccountId). The builder throws from:me requires an authenticated account ID when no viewer ID is supplied. The PR summary states that src/search/parser.ts maps the exact value me to fromMe (+1 line). The from: path in the builder is unchanged at head.
  • Requirement 2: The summary states that the status full-text search call in src/api/v2/index.ts now passes owner.id. The summary does not list any change to visibility logic. Visibility rules were not read directly; the source diff could not be retrieved.
  • Requirement 3: The summary states that parser.test.ts covers literal @me, Me, and email-form from: values, which remain from operators. The from builder path is unchanged.
  • Requirement 4: The summary states that quoted values are not special-cased, and the parser change matches only the exact unquoted value from:me.
  • Tests: src/search/builder.test.ts and src/api/v2/search.test.ts cover the from:me cases, including a shared-username account and has:media combination, per the summary.

Uncertainty: Git diffs were unavailable, so the parser, API, and test changes rely on the PR summary and the head file src/search/builder.ts. The anonymous-search path that throws on from:me was not traced to a user-visible response.

Full details: Out of Scope Changes check

Explanation

The changes fall into these groups:

  • Search core (src/search/builder.ts, parser.ts, types.ts, index.ts) and the status search call in src/api/v2/index.ts: directly implement #702.
  • Tests (builder.test.ts, search.test.ts, parser.test.ts): support the new behavior. The mentions:me test change documents that the from:me special case does not apply to mentions:.
  • Changelog and changes.d entries: document the feature and link #702 and PR #703.
  • Search documentation in en, ja, ko, zh-cn, and zh-tw: describe from:me and from:@me. The mentions:username description was also edited. This is a documentation clarification in the same search page. It does not change buildMentionsFilter code, which is unchanged at head.

No change was shown to be unrelated to #702. The mentions documentation edit is the weakest link to the issue, but it is docs-only and does not alter behavior.

Full details: Title check

Explanation

The title "Support from:me in post search" matches the main change. The PR adds a from:me operator that resolves to the authenticated account ID, and the parser, builder, types, and tests all implement it. The title is short, specific, and states the primary change from the developer's view.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d35c621c-a2d0-4d36-ae6f-22893b0135f3
Commits

Reviewing files that changed from the base of the PR and between e4afe09 and 98c2275.

Files selected for processing: 15

  • CHANGES.md
  • changes.d/search-from-me.md
  • docs/src/content/docs/ja/search.md
  • docs/src/content/docs/ko/search.md
  • docs/src/content/docs/search.md
  • docs/src/content/docs/zh-cn/search.md
  • docs/src/content/docs/zh-tw/search.md
  • src/api/v2/index.ts
  • src/api/v2/search.test.ts
  • src/search/builder.test.ts
  • src/search/builder.ts
  • src/search/index.ts
  • src/search/parser.test.ts
  • src/search/parser.ts
  • src/search/types.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Resolve the bare from:me value to the authenticated account ID. Keep
from:@me and qualified handles literal, including in compound queries.
Cover accounts with the same username on different servers and update
the search manual in all five languages.

Fixes fedify-dev#702

Assisted-by: OpenCode:gpt-6.2-sol
Assisted-by: Antigravity:gemini-4-neon
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: OpenCode:gpt-6.2-astra
@dahlia
dahlia force-pushed the feat-search-from-me branch from af82e6b to 98c2275 Compare November 20, 2026 05:51
@dahlia
dahlia marked this pull request as ready for review November 20, 2026 05:52
@dahlia dahlia added this to the Hollo 0.10 milestone Nov 20, 2026
@dahlia dahlia self-assigned this Nov 20, 2026
@dahlia dahlia changed the title Support from:me in post search Support from:me in post search Nov 20, 2026
@dahlia
dahlia merged commit 49d3126 into fedify-dev:main Nov 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support from:me to search your own posts

1 participant