Skip to content

docs: restore env example and document mock api flag#27

Merged
GunelShukurova merged 2 commits into
mainfrom
fix/dataset-error-handling
Jun 19, 2026
Merged

docs: restore env example and document mock api flag#27
GunelShukurova merged 2 commits into
mainfrom
fix/dataset-error-handling

Conversation

@GunelShukurova

@GunelShukurova GunelShukurova commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Restores the .env.example file and documents the VITE_USE_MOCK_API flag in the README.

This makes it clear that:

  • mock API mode is the default when the flag is not set
  • HTTP dataset API can be enabled with VITE_USE_MOCK_API=false

Area

  • Frontend (apps/web)
  • Backend
  • Docs
  • Other

Screenshots

N/A

Checklist

  • I ran bun run typecheck && bun run build in apps/web (for frontend changes)
  • I bumped the version if this is a meaningful change
  • Commits are small and focused, with no AI attribution lines
  • I updated docs or AGENTS.md if behavior or structure changed

@GunelShukurova

Copy link
Copy Markdown
Contributor Author

I reproduced the failure path locally with VITE_USE_MOCK_API=false and a real /api/dataset 500 response.

The error state renders correctly and Retry works. It looks like the blank screen was environment-specific or related to a different runtime state.

I kept the follow-up issue open for further investigation.

@GunelShukurova GunelShukurova added the area: frontend Frontend web app label Jun 18, 2026
@GunelShukurova GunelShukurova self-assigned this Jun 18, 2026

@martian56 martian56 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The docs themselves are good. The README section is clear, it correctly states mock is the default and HTTP is the opt-in, and restoring .env.example addresses exactly the note I left on #22. Two things to fix before this merges, both quick.

  1. Remove 'Closes #25'. Issue #25 is the blank-screen-on-fetch-failure bug, the real one where the whole app goes blank when the dataset request fails. This PR only touches docs, it does not fix that. If it merges with 'Closes #25' in the body, GitHub auto-closes the bug and we lose track of a live, still-broken issue. Change it to 'Relates to #25' or just drop the line, and leave #25 open until the render bug is actually fixed.

  2. The .env.example value works against us right now, inline. It ships VITE_USE_MOCK_API=false, so anyone who does the usual cp .env.example .env lands in HTTP mode, which is precisely the path that currently blanks the screen on any failure (#25). Until #25 is fixed, the example should keep people on the safe default.

Fix those two and this is a clean merge. Nice that you filed #25 to track the render bug separately, that was the right move.

Comment thread apps/web/.env.example Outdated
@@ -0,0 +1 @@
VITE_USE_MOCK_API=false No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shipping this as false means copying .env.example into .env opts you straight into the HTTP path, which is the one that blanks the screen on any failure today (#25). Two cleaner options: set it to true so a copy keeps the safe mock default, or comment it out with a note, like # VITE_USE_MOCK_API=false # set false to use the HTTP dataset API; defaults to mock. The second documents the flag without flipping anyone into the buggy path by default. Also add a trailing newline, the file currently ends without one.

@GunelShukurova GunelShukurova requested a review from martian56 June 19, 2026 08:28

@martian56 martian56 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Both points addressed, clean. Closes #25 is out of the body so the blank-screen bug stays open and tracked, and .env.example now comments the flag out with a note explaining the default, so copying it keeps the safe mock path instead of opting into the failure path. Trailing newline is there too. The README section reads well. Docs only, nothing to run. Good to merge.

@GunelShukurova GunelShukurova merged commit 7359a28 into main Jun 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Frontend web app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants