feat: source account config + per-hashtag filter (closes #9)#38
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
accessibility-lead reviewed the new form fields: ship, no required fixes (label/id associations, scope=row, heading structure all consistent). Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Implements Phase 3 (Part 1) of the “source account” feature by adding per-hashtag account filtering, a global “brand account” setting, and an on-load DB schema upgrade path so existing installs gain the new account_filter column.
Changes:
- Add
account_filterstorage + normalization/matching helpers, and apply the filter when building hashtag feeds/digests. - Add global
outpost_brand_accountoption (admin UI + settings save + uninstall cleanup). - Introduce
OUTPOST_Activator::maybe_upgrade()and bumpoutpost_db_versionto1.1.0to rundbDelta()upgrades on already-installed sites.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| uninstall.php | Deletes the new outpost_brand_account option on uninstall. |
| tests/Unit/HandleNormalizationTest.php | Adds unit coverage for handle normalization behavior. |
| tests/Unit/AccountFilterMatchTest.php | Adds unit coverage for account-filter matching rules. |
| outpost.php | Runs schema upgrade checks on plugins_loaded. |
| includes/class-outpost-settings.php | Adds getter + save-path for outpost_brand_account (normalized on save). |
| includes/class-outpost-hashtag-manager.php | Adds account_filter persistence; introduces normalize_handle() + post_matches_filter(). |
| includes/class-outpost-feed-fetcher.php | Applies per-hashtag account filtering to fetched/cached posts before slicing. |
| includes/class-outpost-activator.php | Adds account_filter column to schema; bumps DB version; adds maybe_upgrade(). |
| admin/views/settings.php | Adds “Brand account” settings field. |
| admin/views/hashtags.php | Adds per-hashtag “Account filter” add/edit fields. |
| admin/class-outpost-admin.php | Wires new form fields into OUTPOST_Hashtag_Manager::add/update() and settings save. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+198
to
+203
| /** | ||
| * Normalize a Mastodon account handle: trim, strip one leading @, lowercase. | ||
| * | ||
| * @param string $handle | ||
| * @return string | ||
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3, Part 1 of the source-account feature. Implements #9 per
docs/superpowers/specs/2026-06-15-source-account-design.md.What
account_filtercolumn onoutpost_hashtags;OUTPOST_Activator::maybe_upgrade()runsdbDeltafor existing installs and bumpsoutpost_db_versionto1.1.0.OUTPOST_Hashtag_Manager::normalize_handle()andpost_matches_filter()(unit-tested).OUTPOST_Feed_Fetcher::get_posts()(so feed and digest both respect it); blank filter = current behavior.outpost_brand_accountoption +OUTPOST_Settings::get_brand_account(), saved normalized, removed on uninstall.accessibility-leadreviewed (ship, no required fixes).Tests
18/18 unit tests pass (handle normalization + filter match rule added).
Manual verification
account_filtercolumn added,outpost_db_version= 1.1.0, no fatals.Closes #9
🤖 Generated with Claude Code