Dashboard dev server keeps serving a stale @import-ed stylesheet until restarted with --force

Open
#8,821 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
56/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bun, tailwindcss, typescript, vite

Research direction

Start with gui/src/styles.css, the imported sheet gui/src/styles/oauth-tos-danger.css, and the Vite setup in gui; reproduce with the provided Vite command and inspect stylesheet updates after an external edit. The issue suggests checking file watching and @tailwindcss/vite import caching. Done means imported CSS changes appear without restarting Vite with --force.

Written by the indexing model from the issue text.

Description

account-pool bug gui
Client or integration

OpenCodex dashboard

Area

Dashboard

Summary

While developing the dashboard with the Vite dev server (cd gui && bunx vite), an edit to a stylesheet that gui/src/styles.css pulls in with @import "./styles/<file>.css" did not reach the page. Fresh browser profiles kept getting the old rule set until the dev server was restarted with --force. Edits to the component .tsx files reloaded normally. A developer checking a CSS fix in the dev server can therefore conclude the fix does not work when it does.

Reproduction
  1. cd gui && bunx --bun vite --port 5199.
  2. Load a page that uses a rule from an @imported sheet, for example gui/src/styles/oauth-tos-danger.css (added in #8820) via OAuthTosWarningModal for google-antigravity.
  3. Change a selector in that sheet from outside the editor (the change was written by a script), for example .oauth-tos-card--danger → .modal-card.oauth-tos-card--danger.
  4. Load the page in a new headless Chrome profile and read getComputedStyle for the element: it still reflects the old rule. document.styleSheets contained no rule with the new selector.
  5. Restart with bunx --bun vite --port 5199 --strictPort --force: the new rule applies immediately.

Observed on a host under heavy file-system load (fseventsd and mds_stores each above 150% CPU), so a dropped file-watch event is one likely cause; the @tailwindcss/vite plugin caching the resolved @import graph is another.

Version

dev @ f329892401 (branch feat/antigravity-strong-warning)

Operating system

macOS (Apple silicon), Bun 1.4.4, Vite 8.2.4

Provider and model

Not provider specific

Logs or error output

No error; Vite logged nothing for the edit.

Screenshots and supporting files

Found while producing the screenshots for #8820.

Redacted configuration

N/A

Checks
  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.
Dominant language
TypeScript
Stars
16.9k
Forks
1.3k
Avg merge
1d 4h
Merged PRs (30d)
814

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lidge-jun/opencodex

All issues in lidge-jun/opencodex

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.