8000 fix(columns): validate required inputs in linkedin, bluesky, mastodon, youtube by aaronjmars · Pull Request #79 · aeonfun/minitor · GitHub
[go: up one dir, main page]

Skip to content

fix(columns): validate required inputs in linkedin, bluesky, mastodon, youtube - #79

Merged
aaronjmars merged 1 commit into
mainfrom
fix/column-input-validation
Jun 23, 2026
Merged

aaronjmars merged 1 commit into
mainfrom
fix/column-input-validation

Conversation

@aaronjmars
Copy link
Copy Markdown
Collaborator

What

Adds the missing required-input validation to four moded social/search columns — linkedin, bluesky, mastodon, and youtube. Each now throws a clear error when its required input for the active mode is empty or whitespace-only, before any upstream request goes out.

Why

These four columns passed config.query (and the author/channel/playlist inputs) straight to their upstream APIs with no guard. An empty value fired a wasted request — a Grok web_search call for linkedin, a public-AppView / Mastodon / YouTube fetch for the rest — that came back as an opaque upstream error instead of a clear "input required" message. The user just sees the column fail with no idea why.

farcaster and every github-* column already trim-and-throw on their required input. PR #78 fixed this same class of bug across the five Grok-backed search columns (x-search, news-search, facebook, instagram, google-news) but didn't cover these four. This brings the rest in line.

Changes

  • lib/columns/plugins/linkedin/server.ts: throw on empty query (Grok-backed, single required input); pass the trimmed value through.
  • lib/columns/plugins/bluesky/server.ts: throw on empty query in search mode, empty handle in author mode.
  • lib/columns/plugins/mastodon/server.ts: throw on empty query (hashtag) in hashtag mode, empty handle in author mode.
  • lib/columns/plugins/youtube/server.ts: throw on empty query/channel/playlist for the matching mode.

Guard-only — the values passed to the integrations are unchanged (except linkedin, which now forwards the trimmed query, matching farcaster). No behavior change for valid inputs.


Built autonomously by Aeon

…, youtube

These four moded social/search columns passed config.query (and the
author/channel/playlist inputs) straight to their upstream APIs with no
guard. An empty or whitespace-only value fired a wasted request — a
Grok web_search call for linkedin, an AppView/Mastodon/YouTube fetch for
the rest — that came back as an opaque upstream error instead of a clear
'input required' message.

Brings them in line with farcaster and the github-* columns, which
already trim-and-throw on their required input. Continues PR #78, which
fixed the same class of bug across the five Grok-backed search columns
but didn't cover these.

- linkedin: throw on empty query (Grok-backed, single required input)
- bluesky/mastodon: throw on empty query in search/hashtag mode and on
  empty handle in author mode
- youtube: throw on empty query/channel/playlist per mode

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aaronjmars
aaronjmars merged commit b4d1685 into main Jun 23, 2026
2 checks passed
@aaronjmars
aaronjmars deleted the fix/column-input-validation branch June 23, 2026 15:32
aaronjmars added a commit that referenced this pull request Jun 24, 2026
…#80)

* docs(plugins): teach required-input validation in the column template

PRs #78/#79 added trim-and-throw guards for required inputs across the
Grok-backed and moded social columns, but the `_template/` every new column
is copied from — and the plugin contract README — never taught the pattern.
A contributor scaffolding a new column inherits the exact gap those two PRs
closed: Zod `.default("")` guarantees a field is present and typed, but not
non-empty, so an empty query fires a wasted upstream call that returns an
opaque error instead of a clear "X is required."

- _template/server.ts: document the guard at the top of `fetch`, with the
  canonical `config.query.trim()` check and a note that the hello-world demo
  intentionally skips it. Comment-only — the template still runs as-is.
- lib/columns/README.md: correct step 4 ("present" is not "non-empty") and
  add a "Validate required inputs" convention with the exact pattern and the
  note that a throw is caught by the shared API route as the column error state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(plugins): scope the required-input convention to what code actually does

Soften "every input-driven column" — the query-driven github columns
(search/issues/prs/backlinks) don't guard, only the repo-based ones do — and
correct the error surface: a thrown error becomes a fetch-error toast, not an
inline column error state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: aeonframework <aeonframework@proton.me>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0