Repository navigation
Folder-per-plugin column architecture + Zod schemas + parity check - #3
Merged
Merged
Conversation
Each column type now lives in `lib/columns/plugins/<id>/` with three files:
- `plugin.ts` — pure metadata (id, label, icon, Zod schema, capabilities)
- `client.tsx` — "use client" ConfigForm + ItemRenderer
- `server.ts` — "server-only" fetch function
The schema in plugin.ts is the single source of truth for the config
shape: API route validates body.config against it (structured 400 on bad
input), defaultConfig is `schema.parse({})`, and fetchers receive a fully
typed config. Each plugin also declares a TMeta interface so renderers
get `FeedItem<TMeta>` directly instead of `typeof m.foo === "number"`
guards.
Capabilities object replaces the lone `paginated` boolean — adds
`requiresEnv`, `rateLimitHint`, `refreshIntervalHintMs`. The Add column
dialog auto-renders a notes block when `requiresEnv` or `rateLimitHint`
is set.
A new `plugins/manifest.ts` is the canonical id list. Both registries
(`registry.ts` for client UI, `server-registry.ts` for fetchers) are
keyed by id and validated against the manifest at module init —
forgetting either half throws loudly rather than 404'ing at request time.
Includes a copyable `_template/` plugin and a `lib/columns/README.md`
walkthrough.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 9, 2026
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.
Summary
Each column type now lives in
lib/columns/plugins/<id>/with three files:plugin.ts(pure metadata + Zod schema),client.tsx(UI),server.ts(fetcher). Schemas are the single source of truth — the API route validatesbody.configagainst the plugin's schema and returns structured 400s on bad input.A new
plugins/manifest.tsis the canonical id list. Both registries (registry.tsfor client UI,server-registry.tsfor fetchers) are validated against it at module init, so registering on one side and forgetting the other throws loudly rather than 404'ing in production.What landed
defaultConfigis nowschema.parse({}). Thes(c.foo, fallback)runtime extraction pattern is gone.meta— each plugin declares aTMetainterface; renderers receiveFeedItem<TMeta>directly (notypeof m.foo === "number"guards).paginated,requiresEnv,rateLimitHint,refreshIntervalHintMs. Add-column dialog auto-renders a notes block when env vars or rate limits are declared.server-registry.tsvalidates the manifest at module init; mismatches throw immediately.category(ai | social | news | video | blockchain | other) — wiring is in place for grouped UI when 30+ plugins justify it.lib/columns/plugins/_template/is a copyable starter;lib/columns/README.mdwalks through the contract; mainREADME.mdupdated.Test plan
npx tsc --noEmitcleannpx eslint .cleannpm run buildsucceeds (parity check passes at server init, all 4 routes generate)🤖 Generated with Claude Code