Repository navigation
fix: move non-action exports out of "use server" actions.ts so the app builds - #71
Merged
Merged
Conversation
…p builds
`app/actions.ts` carries `"use server"`, where Next/Turbopack allows only
async-function exports. It also exported several plain values —
`REFRESH_INTERVAL_OPTIONS`, `isAllowedRefreshInterval`, `TAB_GROUP_MAX`,
`COLOR_HEX_RE`, `normalizeColumnColor`, `DECK_EXPORT_VERSION` — which trips
"Only async functions are allowed to be exported in a 'use server' file".
That makes the whole module fail to load, cascading into 62 build errors
("The module has no exports at all") across every importer, so `next build`
fails outright. `tsc` does not enforce this rule, which is how it landed on a
green-looking main.
Hoist the shared constants + sync validators into a new plain module
`lib/deck-rules.ts`, import them back into `actions.ts` for internal use, and
point the client store at the new module. `actions.ts` now exports only Server
Actions (plus erased type-only exports, which "use server" permits).
Verified: `next build` compiles + generates all routes, `tsc --noEmit` clean,
eslint clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 13, 2026
aaronjmars
added a commit
that referenced
this pull request
Jun 18, 2026
minitor had no CI. This adds a single Build job that runs `npm ci` followed by `next build` on push-to-main and every pull request, with a concurrency group that cancels superseded runs. `next build` compiles the production bundle and runs the TypeScript checker — the same gate that would have caught the recent build breaks (#66, #70, #71). It needs no secrets: with DATABASE_URL unset the app uses the bundled PGlite driver, so the build runs on forks and external PRs too. Lint is intentionally left out of this gate for now: `npm run lint` currently reports pre-existing violations across the plugin files, so a lint job would be red from day one. Worth a focused follow-up. Co-authored-by: aaronjmars <aaronjmars@users.noreply.github.com>
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.
What
maindoes not build.next buildfails with 62 errors, all cascading from a single root cause inapp/actions.ts.That file carries the
"use server"directive, and Next/Turbopack permits a"use server"module to export only async functions. But it also exported six plain values:REFRESH_INTERVAL_OPTIONS(const)isAllowedRefreshInterval(sync function)TAB_GROUP_MAX(const)COLOR_HEX_RE(const)normalizeColumnColor(sync function)DECK_EXPORT_VERSION(const)Turbopack rejects these with "Only async functions are allowed to be exported in a 'use server' file", which makes the entire module fail to load — so every importer then errors with "The module has no exports at all", taking down the whole app build.
tscdoesn't enforce the"use server"export rule — onlynext builddoes — which is how this slipped onto a green-lookingmain.Why
A dead production build blocks every contributor and any deploy. This is the highest-priority thing to unblock on the repo right now.
Changes
lib/deck-rules.ts(new): a plain (non-"use server") module holding the shared deck/column validation rules —REFRESH_INTERVAL_OPTIONS+RefreshIntervalSeconds,isAllowedRefreshInterval,TAB_GROUP_MAX,COLOR_HEX_RE,normalizeColumnColor,DECK_EXPORT_VERSION. Code and doc-comments moved verbatim — no behavior change.app/actions.ts: removed those declarations; imports them back fromlib/deck-rulesfor internal use. The file now exports only Server Actions (plus type-only exports, which"use server"permits).lib/store/use-deck-store.ts: the client store now importsisAllowedRefreshInterval/normalizeColumnColor/TAB_GROUP_MAXfromlib/deck-rulesinstead of through the"use server"boundary — it gets the real synchronous values, which is what it was always calling them as.The existing local copies of these constants in
configure-column-dialog.tsx/deck-color-dialog.tsxare left untouched to keep the diff focused on the build fix.Verification
next build— ✅ compiles + generates all 7 routestsc --noEmit— ✅ cleaneslint— ✅ cleanBuilt autonomously by Aeon