Skip to content

Feature/implement v2#25

Open
MaheeGamage wants to merge 5 commits into
mainfrom
feature/implement-v2
Open

Feature/implement v2#25
MaheeGamage wants to merge 5 commits into
mainfrom
feature/implement-v2

Conversation

@MaheeGamage

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 18, 2026 11:49
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
finnish-learner Ready Ready Preview, Comment Jul 20, 2026 12:50pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes environment-backed application configuration into explicit server/client config facades (with validation + shared boolean parsing), removes the old vocab-saving flag wrapper, and updates documentation/project scaffolding accordingly.

Changes:

  • Added src/config/ config facade modules (config.server.ts, config.client.ts) plus env/boolean helpers and unit tests.
  • Migrated auth + vocab saving gates to use the new config modules and removed vocabSavingFlag.ts / the VOCAB_SAVING_ENABLED override.
  • Updated docs, project templates/tasks, and devcontainer/attributes to align with the new config approach and improve line-ending handling.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/vocab-store/vocabSavingFlag.ts Removed legacy env-flag wrapper in favor of centralized config.
src/modules/vocab-store/saveVocab.ts Client-side save gate now reads config.VOCAB_SAVING_ENABLED.
src/lib/auth.ts OAuth client ID/secret now sourced from config.server.
src/config/env.ts Introduced server-only env helpers (requireEnv, optionalEnv).
src/config/env.test.ts Added unit tests for env helper behavior.
src/config/config.server.ts Added server-side config facade (required env validation + vocab flag).
src/config/config.server.test.ts Added tests ensuring fail-fast behavior and boolean flag parsing.
src/config/config.client.ts Added client-safe config facade sourced from NEXT_PUBLIC_*.
src/config/booleanEnv.ts Added shared pure boolean env parsing helper.
src/config/booleanEnv.test.ts Added tests for boolean parsing semantics.
src/app/api/vocab/route.ts Server-side save route now gates via config.VOCAB_SAVING_ENABLED.
README.md Updated env var docs to remove server override and reflect unified flag usage.
docs/setup-guide.md Updated setup guidance and references for the new config/flag approach.
.project/templates/task.md Improved guidance for writing skimmable task descriptions.
.project/templates/goal.md Improved guidance for writing skimmable goals/context/success criteria.
.project/tasks/task-019_centralized-app-config.md Added/updated task record describing config-facade approach and migration.
.project/tasks/task-018_unified-settings-management.md Added draft task describing future unified settings registry.
.project/tasks/task-006_google-sheets-adapter.md Added post-done note documenting removal of server-side override flag.
.project/README.md Documented “readable over complete” convention for human-facing sections.
.project/overview.md Updated active-goal task list to include new tasks.
.gitattributes Added line-ending normalization rules (LF for .sh).
.env.local.example Removed VOCAB_SAVING_ENABLED override from example env file.
.devcontainer/Dockerfile Strips CRLF from firewall script before chmod to avoid shebang failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
import { requireEnv } from './env.ts';
import { parseBooleanEnv } from './booleanEnv.ts';
Comment thread src/config/env.ts
@@ -0,0 +1,14 @@
// Server-only raw env access. Only used inside config.server.ts entries that are in fact
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