-
Notifications
You must be signed in to change notification settings - Fork 2
feat(web): root docs locale and portless dev flow #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,9 +8,9 @@ | |
| "node": ">=22.0.0" | ||
| }, | ||
| "scripts": { | ||
| "dev": "vite --port 4324", | ||
| "dev": "portless run --name dashboard vite", | ||
| "build": "vue-tsc -b && vite build", | ||
| "preview": "vite preview --port 4324", | ||
| "preview": "portless run --name dashboard vite preview", | ||
|
Comment on lines
+11
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: fd -t f "vite.config" clients/web/apps/dashboard/Repository: dallay/corvus Length of output: 140 🏁 Script executed: cat -n clients/web/apps/dashboard/playwright.config.tsRepository: dallay/corvus Length of output: 684 🏁 Script executed: cat -n clients/web/apps/dashboard/vite.config.tsRepository: dallay/corvus Length of output: 686 🏁 Script executed: fd -t f "build.gradle.kts" | head -5Repository: dallay/corvus Length of output: 232 🏁 Script executed: rg -A 5 "portless" clients/web/apps/dashboard/package.jsonRepository: dallay/corvus Length of output: 792 🏁 Script executed: rg -i "portless" clients/web/ --type-listRepository: dallay/corvus Length of output: 446 🏁 Script executed: fd -t f "portless.config\|portless\." clients/web/Repository: dallay/corvus Length of output: 39 🌐 Web query:
💡 Result:
Sources: Vite CLI options [1]; Portless flags/behavior (including Vite auto-injection and 🏁 Script executed: # Check if portless is documented in any README or config files
rg -l "portless" clients/web/ | head -10Repository: dallay/corvus Length of output: 417 Fix the Playwright webServer command to work with Line 11 now routes Either update the Playwright command to:
Or configure Vite to respect 🤖 Prompt for AI Agents |
||
| "format": "biome format --write src package.json components.json tsconfig*.json vite.config.ts index.html", | ||
| "check": "biome check src package.json components.json tsconfig*.json vite.config.ts index.html", | ||
| "test": "vitest --run --environment happy-dom --exclude e2e/**", | ||
|
|
@@ -38,6 +38,7 @@ | |
| "@vue/tsconfig": "catalog:", | ||
| "happy-dom": "catalog:", | ||
| "postcss": "catalog:", | ||
| "portless": "catalog:", | ||
| "tailwindcss": "catalog:", | ||
| "typescript": "catalog:", | ||
| "vite": "catalog:", | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,12 @@ pnpm install | |||||||||||
| # Start dev server | ||||||||||||
| pnpm run dev | ||||||||||||
|
|
||||||||||||
| # Portless URL (default) | ||||||||||||
| # http://docs.localhost:1355 | ||||||||||||
|
|
||||||||||||
| # Run without portless (legacy localhost port) | ||||||||||||
| PORTLESS=0 pnpm run dev | ||||||||||||
|
Comment on lines
+20
to
+21
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Document the legacy URL as well.
Suggested doc fix # Run without portless (legacy localhost port)
+# http://localhost:4321
PORTLESS=0 pnpm run devAs per coding guidelines, " 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
|
|
||||||||||||
| # Build static site | ||||||||||||
| pnpm run build | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,7 +45,7 @@ Contiene todas las aplicaciones cliente que consumen los módulos compartidos: | |||||||||||||||||||
|
|
||||||||||||||||||||
| ## El Directorio `docs` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - **`docs/es/`**: Documentación en español. | ||||||||||||||||||||
| - **`docs/`**: Documentación en inglés (locale raíz). | ||||||||||||||||||||
| - `index.mdx`: Página de inicio. | ||||||||||||||||||||
| - `guides/`: Guías detalladas del proyecto. | ||||||||||||||||||||
| - **`docs/en/`**: Documentación en inglés (si aplica). | ||||||||||||||||||||
| - **`docs/es/`**: Documentación en español. | ||||||||||||||||||||
|
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix the Spanish locale paths. These entries still point to Suggested doc fix-- **`docs/`**: Documentación en inglés (locale raíz).
+- **`clients/web/apps/docs/src/content/docs/`**: Documentación en inglés (locale raíz).
- `index.mdx`: Página de inicio.
- `guides/`: Guías detalladas del proyecto.
-- **`docs/es/`**: Documentación en español.
+- **`clients/web/apps/docs/src/content/docs/es/`**: Documentación en español.As per coding guidelines, " 📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~49-~49: Elimina la puntuación (QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_PUNCTUATION) 🤖 Prompt for AI Agents |
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| const { slug } = Astro.params; | ||
| const baseUrl = import.meta.env.BASE_URL.endsWith("/") | ||
| ? import.meta.env.BASE_URL.slice(0, -1) | ||
| : import.meta.env.BASE_URL; | ||
| Astro.redirect(`${baseUrl}${slug ? `/${slug}` : "/"}`); | ||
|
Comment on lines
+2
to
+6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Yes. In Astro v5, a page must (And Sources: [1] Astro API reference ( Return the redirect response. This calls Minimal fix-Astro.redirect(`${baseUrl}${slug ? `/${slug}` : "/"}`);
+return Astro.redirect(`${baseUrl}${slug ? `/${slug}` : "/"}`);🤖 Prompt for AI Agents |
||
| --- | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,11 +9,19 @@ const DEFAULT_PROD_URL = "https://profiletailors.com"; | |
| const mode = process.env.NODE_ENV || "production"; | ||
| const env = loadEnv(mode, process.cwd(), ""); | ||
|
|
||
| const portlessUrl = | ||
| mode === "production" | ||
| ? "" | ||
| : resolvePublicUrl(process.env.PORTLESS_URL ?? env.PORTLESS_URL, ""); | ||
| const marketingUrl = resolvePublicUrl( | ||
| env.MARKETING_URL, | ||
| env.MARKETING_URL ?? (portlessUrl || undefined), | ||
| mode === "production" ? DEFAULT_PROD_URL : DEFAULT_DEV_URL | ||
| ); | ||
| const resolvedPort = getPortFromUrl(marketingUrl, PORTS.MARKETING); | ||
| const portCandidate = process.env.PORT ?? env.PORT; | ||
| const parsedPort = Number.parseInt(portCandidate ?? "", 10); | ||
| const resolvedPort = Number.isFinite(parsedPort) | ||
| ? parsedPort | ||
| : getPortFromUrl(marketingUrl, PORTS.MARKETING); | ||
|
Comment on lines
+20
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, examine the actual file
cat -n clients/web/apps/marketing/astro.config.mjs | head -40Repository: dallay/corvus Length of output: 1530 🏁 Script executed: # Test Number.parseInt() behavior with the claimed problematic values
node <<'EOF'
console.log("Testing Number.parseInt() behavior:");
console.log("parseInt('123abc', 10):", Number.parseInt("123abc", 10));
console.log("parseInt('0', 10):", Number.parseInt("0", 10));
console.log("parseInt('70000', 10):", Number.parseInt("70000", 10));
console.log("parseInt('', 10):", Number.parseInt("", 10));
console.log("parseInt('abc', 10):", Number.parseInt("abc", 10));
console.log("");
console.log("isFinite() checks:");
console.log("isFinite(123):", Number.isFinite(123));
console.log("isFinite(NaN):", Number.isFinite(NaN));
console.log("isFinite(0):", Number.isFinite(0));
console.log("isFinite(70000):", Number.isFinite(70000));
console.log("");
console.log("isInteger() checks:");
console.log("isInteger(123):", Number.isInteger(123));
console.log("isInteger(0):", Number.isInteger(0));
console.log("isInteger(NaN):", Number.isInteger(NaN));
console.log("");
console.log("Port range validation [1..65535]:");
console.log("Valid port 80:", 80 >= 1 && 80 <= 65535);
console.log("Valid port 8080:", 8080 >= 1 && 8080 <= 65535);
console.log("Invalid port 0:", 0 >= 1 && 0 <= 65535);
console.log("Invalid port 65536:", 65536 >= 1 && 65536 <= 65535);
console.log("Invalid port 70000:", 70000 >= 1 && 70000 <= 65535);
EOFRepository: dallay/corvus Length of output: 552 🏁 Script executed: # Test the regex pattern from the diff suggestion
node <<'EOF'
const regex = /^(?:0|[1-9]\d{0,4})$/;
const testValues = ["0", "1", "80", "8080", "65535", "65536", "70000", "123abc", "abc", "", "00", "08", "99999"];
console.log("Testing regex /^(?:0|[1-9]\\d{0,4})$/:");
testValues.forEach(val => {
console.log(`"${val}": ${regex.test(val)}`);
});
EOFRepository: dallay/corvus Length of output: 257 Fix port validation—current regex in diff allows invalid ports beyond 65535. The issue is real: Use a strict range check instead: Corrected diff const portCandidate = process.env.PORT ?? env.PORT;
-const parsedPort = Number.parseInt(portCandidate ?? "", 10);
-const resolvedPort = Number.isFinite(parsedPort)
+const parsedPort = Number.parseInt(portCandidate ?? "", 10);
+const resolvedPort =
+ Number.isInteger(parsedPort) && parsedPort >= 1 && parsedPort <= 65535
? parsedPort
: getPortFromUrl(marketingUrl, PORTS.MARKETING);🤖 Prompt for AI Agents |
||
|
|
||
| export default defineConfig({ | ||
| site: marketingUrl, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: dallay/corvus
Length of output: 674
🏁 Script executed:
fd -t f -i 'readme*' clients/web/apps/chatRepository: dallay/corvus
Length of output: 88
🏁 Script executed:
git ls-files clients/web/apps/chat | grep -i readmeRepository: dallay/corvus
Length of output: 88
🌐 Web query:
portless PORTLESS=0 environment variable fallback behavior vite💡 Result:
portlesshas a built-in “escape hatch” env var:PORTLESS=0(orPORTLESS=skip), portless bypasses the proxy entirely and just runs your command normally (no named.localhostURL, no proxy auto-start, and no portless port/host injection). [1]PORT/HOST; because Vite ignoresPORT, portless instead auto-injects--portand--hostwhen it is enabled. [1]PORTLESS=0, that injection doesn’t happen, so Vite falls back to its normal behavior (default dev port, and if that port is taken it will try the next available port). [2]Example
PORTLESS=0 pnpm dev # runs plain `vite` (or whatever your dev script runs), no proxySources: portless configuration docs [1]; Vite server option docs (port fallback) [2].
🏁 Script executed:
Repository: dallay/corvus
Length of output: 956
Fix port fallback for
PORTLESS=0legacy mode.The
--port 4323flag was removed from the vite commands, andvite.config.tsdoes not specifyserver.port. WhenPORTLESS=0is set, portless bypasses entirely and Vite falls back to port 5173 instead of the documented 4323.Add
server: { port: 4323 }tovite.config.tsto preserve the README contract: "UsePORTLESS=0 pnpm dev:chatto run on http://localhost:4323".🤖 Prompt for AI Agents