Skip to content

Commit .env.example and local-setup notes so ui-react runs for someone who is not Max #72

Closed

Description

@mosoriob

Question

ui-react/ has a personal .env.development and .env.local and no .env.example. Nobody else can stand the app up, and after three weeks away neither can you without reconstructing it. This is the "localhost is not easy to test" friction, and it taxes every other ticket on this map.

Produce a committed .env.example listing every VITE_* the app reads, with safe defaults and a comment per variable saying what it points at and whether it is required. Add a short "Running locally" section to ui-react/README.md.

Read the real list from src/lib/config.ts — getRuntimeConfig() falls back to VITE_* in dev while the deployed app reads the nested window.__MINT_CONFIG__. Do not guess the variable names.

Note getModelCatalogApiUrl() in src/lib/config.ts has no callers and defaults to the retired v1.8.0 SPARQL-era endpoint. Do not document it as live — delete it or mark it dead while you are here.

Activity

  1. added
    wayfinder:taskWayfinder ticket: manual work that unblocks a decision
    on Aug 8, 2026
  2. self-assigned this
    on Aug 8, 2026
  3. mosoriob commented on Aug 8, 2026

    @mosoriob
    ContributorAuthor

    Resolved in PR #83.

    The ticket asked for a .env.example. That file cannot solve the problem. This is the finding.

    Why a .env file does not work

    index.html always loads public/env-config.js. That file sets window.__MINT_CONFIG__. The app reads the VITE_* variables only when window.__MINT_CONFIG__ is absent. It is never absent on a local machine, because public/env-config.js is in git.

    .env.development was in git for this reason and had no effect.

    The real fault was one line. HASURA_ENDPOINT pointed to http://graphql.mint.local/v1/graphql. That address is inside the cluster.

    What I did

    • public/env-config.js now points to TACC's public endpoints. A clone plus npm install plus npm run dev now shows real model catalog data. I verified this with a live query from a localhost:3000 origin.
    • Added .env.example and npm run config:local.
    • Added the README section "Running locally".
    • Deleted .env.development.
    • Deleted MODEL_CATALOG_API and getModelCatalogApiUrl(). No code used them.

    The defaults in generate-env-config.mjs do not change. The cluster and a laptop need different addresses.

    Facts for later tickets

    • #75 must now set 12 keys. The sharpen block on that ticket lists them.
    • Set ENSEMBLE_MANAGER_API. MintThread.tsx reads it. If it is absent, thread execution stops without an error.
    • Local sign-in does not work. Each origin needs its own OAuth2 client, as #70 found. Anonymous browsing works.
    • One fault stays. Four files hold a copy of the VITE_* defaults: lib/config.ts, lib/apollo-client.ts, lib/auth/oauth2-adapter.ts and pages/AppHome.tsx. Three copies do not agree. Only the tests read them.

    Tests

    738 tests pass. The typecheck, the lint, the format check and the build are correct.

  4. mosoriob commented on Aug 8, 2026

    @mosoriob
    ContributorAuthor

    Closing: the question is answered and the findings are recorded above. The code lands via PR #83, which is open, not merged — and because it targets develop rather than the default branch, its Closes #72 keyword will not fire on merge, which is why this is closed by hand. Reopen if review changes the answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:taskWayfinder ticket: manual work that unblocks a decision

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions