Completes the front-end shell and adds CI/CD #3
@@ -618,3 +618,39 @@ Verder heb ik de vraag ook beantwoord"
|
||||
**Context**: OPERATIONS - Deployment Setup; commit and push for pipeline verification
|
||||
|
||||
---
|
||||
|
||||
## Deployment Setup - Pull Request
|
||||
|
||||
**Timestamp**: 2026-10-18T22:22:48Z
|
||||
|
||||
**User Input**: "okee. kan jij een PR aanmaken? Dan kijk ik wat de PR doet met de workflow. EVentueel mergens we de changes en PR zonder de feature branch te verwijderen zodat wer daarna door kunnen op deze branch met het aan de praat krijgen, maar dan staat de workflow in ieder geval al op master"
|
||||
|
||||
**AI Response**: "Created Gitea PR #3 (feature/frontend-shell -> master) via the API using the stored Git Credential Manager login; body without 4-byte emoji (Gitea DB limitation, attribution line without the robot emoji); body asks to keep the branch on merge. PR mergeable. Workflow run started on the pull_request event (job 'check' running at e643660)."
|
||||
|
||||
**Context**: OPERATIONS - Deployment Setup; pipeline verification via PR #3
|
||||
|
||||
---
|
||||
|
||||
## Deployment Setup - Monitoring PR Run and Test 500
|
||||
|
||||
**Timestamp**: 2026-10-18T22:25:18Z
|
||||
|
||||
**User Input**: "Kan jij de workflow in de gaten houden? Dan kan je zelf kijken wat er mis gaat eventueel. Ik zie wel op test.andreaslop.nl dat ik een 500 error krijg. Klopt dat? De map is namelijk nog leeg"
|
||||
|
||||
**AI Response**: "Checked https://test.andreaslop.nl: 500 from nginx 1.24 with our CSP and X-Robots-Tag headers, so proxy, certbot, Host header and test block work. Cause: empty folder makes try_files fall back to /index.html, which loops (internal redirection cycle -> 500). Changed generator to 'try_files $uri $uri/ /index.html =404' (404 instead of loop), test updated, config regenerated; not pushed yet to avoid cancelling the running PR run. Started a background watcher (Gitea API, 30 s interval, logs status changes and failed job logs) on run 526 for e643660."
|
||||
|
||||
**Context**: OPERATIONS - Deployment Setup; watching PR #3 run
|
||||
|
||||
---
|
||||
|
||||
## Deployment Setup - First CI Run Result
|
||||
|
||||
**Timestamp**: 2026-10-18T22:33:41Z
|
||||
|
||||
**User Input**: "Top. Heb het config bestand aangepast en die heeft nu inderdaad een 404. Ik zie dat de workflow faalt bij de tests"
|
||||
|
||||
**AI Response**: "Owner applied try_files =404 on the hosting Pi (empty folder now 404). Watcher bug: Windows console could not print a check mark from the log and looped instead of exiting; stopped it, fetched job 4574 log via API. Run 526: lint and format passed (line endings fixed by .gitattributes); 92/93 tests passed; '/ rendert binnen de shell' timed out at 5 s (7.0 s on the arm64 Pi; first render per file is slow, e.g. Footer 3.6 s). Set vitest testTimeout 20 s with rationale; silenced the router's expected warning in the crash test. Local: lint, format, 93 tests, tsc pass. Watcher fixed (UTF-8 stdout, logs to file, always exits). Committing and pushing to re-run PR #3."
|
||||
|
||||
**Context**: OPERATIONS - Deployment Setup; fixing CI
|
||||
|
||||
---
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('serverconfiguratie', () => {
|
||||
const nginx = nginxTestConf();
|
||||
expect(nginx).toContain('X-Robots-Tag "noindex, nofollow"');
|
||||
expect(nginx).toContain('Disallow: /');
|
||||
expect(nginx).toContain('try_files $uri $uri/ /index.html;');
|
||||
expect(nginx).toContain('try_files $uri $uri/ /index.html =404;');
|
||||
});
|
||||
|
||||
it('het testblok claimt nooit de standaardserver (WordPress op dezelfde Pi)', () => {
|
||||
|
||||
@@ -117,10 +117,12 @@ ${block(' ', ['add_header Cache-Control "public, max-age=31536000, immuta
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# SPA-fallback: onbekende paden krijgen index.html (de router toont de 404)
|
||||
# SPA-fallback: onbekende paden krijgen index.html (de router toont de 404).
|
||||
# =404 aan het eind: zonder index.html (lege map) een 404 in plaats van een
|
||||
# doorverwijzingslus die nginx als 500 afbreekt
|
||||
location / {
|
||||
${block(' ', ['add_header Cache-Control "no-cache" always;'])}
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -47,7 +47,9 @@ server {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# SPA-fallback: onbekende paden krijgen index.html (de router toont de 404)
|
||||
# SPA-fallback: onbekende paden krijgen index.html (de router toont de 404).
|
||||
# =404 aan het eind: zonder index.html (lege map) een 404 in plaats van een
|
||||
# doorverwijzingslus die nginx als 500 afbreekt
|
||||
location / {
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
@@ -56,6 +58,6 @@ server {
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header X-Robots-Tag "noindex, nofollow" always;
|
||||
add_header Cache-Control "no-cache" always;
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ describe('app', () => {
|
||||
it('toont een fout in een pagina als foutpagina binnen de shell', async () => {
|
||||
crash.enabled = true;
|
||||
vi.spyOn(console, 'error').mockImplementation(() => {});
|
||||
// De router meldt de bewust gegooide fout ook als waarschuwing
|
||||
vi.spyOn(console, 'warn').mockImplementation(() => {});
|
||||
await renderApp('/portfolio');
|
||||
expect(
|
||||
await screen.findByRole('heading', {
|
||||
|
||||
@@ -33,6 +33,9 @@ export default defineConfig({
|
||||
preview: { headers: securityHeaders('production') },
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
// De CI-runner (Raspberry Pi, arm64) is ±5-8x trager dan een pc; de
|
||||
// eerste render met axe duurt daar tot 7 s. 5 s (standaard) is te krap.
|
||||
testTimeout: 20_000,
|
||||
globalSetup: ['./config/testSeed.ts'],
|
||||
setupFiles: ['./src/test/setup.ts'],
|
||||
css: false,
|
||||
|
||||
Reference in New Issue
Block a user