chore: unify dev environment with data-fair conventions#56
Open
chore: unify dev environment with data-fair conventions#56
Conversation
Move the log-tee.sh wrap from the root dev-ui script into ui/package.json's dev script, matching the convention already used for api and portal.
- Add dev/scripts/log-tee.sh helper: runs a command with FORCE_COLOR=1 for the terminal while writing an ANSI-stripped copy to a log file. - Add dev/scripts/dev-deps.sh: brings up the dev profile, streams logs to dev/logs/docker-compose.log in the background, and shows a refreshing status table; exiting the pane only stops the watch + log streamer. - Wire log-tee into api and portal dev scripts (root keeps it for the ingress-manager which has no workspace). - Rewrite dev/worktree.sh and dev/delete-worktree.sh with safety checks and full setup/cleanup (env, deps, builds, docker volumes/images). - .zellij.kdl: silence nvm output and call top-level scripts (dev-ui, dev-api, dev-portal) instead of bypassing them via npm -w. - Document worktree workflow and dev superadmin usage in AGENTS.md. - Add superadmin@dev.com (id dev_superadmin, password passwd) to the test directory + simple-directory ADMINS list and dev_org membership, so devs can play locally without their data being wiped by tests. - Unify the test_superadmin password to "passwd" (was "superpasswd") and simplify tests/fixtures/login.ts and tests/support/axios.ts. - Silence dotenv parse output in api configs (quiet: true). - Drop unused portal/app/components/tsconfig.json.
Group it with the other dev helpers (log-tee.sh, dev-deps.sh). PROJECT_DIR now goes up two levels instead of one; AGENTS.md references updated.
- Mention .nvmrc / `nvm use` in prerequisites. - Add the missing setup steps: ./dev/init-env.sh and the initial `npm -w ui run build`, with a note about the known bug forcing the UI build before the API can start. - Add the mock ingress manager to the Services list. - Tests section: bootstrap via `npm run dev-zellij` (not just dev-deps), document test-unit/test-api/test-e2e and `npm run test -- <path>` (test-only no longer exists). - Drop the leftover "Setup the development environment TODO" section.
…a clean The UI vite build pulls in Vue components from portal/app/components and needs portal/.nuxt/tsconfig.app.json to type-check them. That file is generated by `nuxt prepare`, but until now nothing in the project ran it, so a fresh checkout (or anything that wipes portal/.nuxt) made `npm -w ui run build` fail with TSConfckParseError. - portal/package.json: add `"postinstall": "nuxt prepare"` so `npm i` always produces a populated portal/.nuxt. - portal/nuxt.config.ts: the existing nitropack workaround used `process.exit(0)` in the close hook, which fires before writeTypes during `nuxt prepare` and skipped tsconfig.app.json generation. Defer the exit by 1s when `_prepare` is set so writeTypes can finish; keep the immediate exit for real builds.
…wrapping Import $Fetch from nitropack/types (matches the type returned by $fetch.create()) instead of ofetch, type the locale prop as string since Vue auto-unwraps refs in templates and re-wrap it via toRef before passing to composables, and guard the english fallback in createAgentTranslator against an undefined messages.en.
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.
.zellij.kdllayout, newdev/scripts/directory hostinglog-tee.sh,dev-deps.shand the relocatedstatus.sh, and consistent log-tee wrapping for the UI dev script.dev/worktree.shanddev/delete-worktree.shso worktree create/delete handle the full lifecycle:.envgeneration with randomized ports,npm ci,build-types, UI build on create;docker compose --profile dev --profile test down -v --remove-orphans --rmi localplus worktree removal on delete.CONTRIBUTING.mdandAGENTS.mdto document the current workflow (status script path, worktree scripts, log files indev/logs/, dev-only superadmin usersuperadmin@dev.com).dev_superadminentry indev/resources/users.jsonand a matching org indev/resources/organizations.jsonso manual play data is not wiped by theDELETE /api/test-envcleanup (which only removesowner.idstarting withtest_).portal/package.jsonnow generates.nuxttypes via apostinstallnuxi prepare, and the obsoleteportal/app/components/tsconfig.jsonis removed.package-lock.json.