Skip to content

Commit d5f6412

Browse files
committed
(scripted) Update paths for new frontend structure
1 parent a6db24f commit d5f6412

47 files changed

Lines changed: 233 additions & 251 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/feature-walkthrough/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ vs `main`. Flags: `--html` (also emit a rendered HTML twin), `--no-screens`.
3232
- Read the PR description / commit messages for stated intent. Do **not** invent
3333
history or motivation that isn't evidenced (state current behavior in present tense).
3434
- Classify touched files by layer:
35-
- **Frontend**: tools (`frontend/editor/src/core/components/tools/*` or `.../core/tools/*`),
35+
- **Frontend**: tools (`frontend/src/editor/core/components/tools/*` or `.../core/tools/*`),
3636
hooks (`core/hooks/tools/*`, `useToolOperation`), contexts, routes, i18n
3737
(`public/locales/en-US`).
3838
- **Java backend**: controllers (`.../controller/api/...`), services, models, config.

.claude/skills/ui-before-after/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ gh pr diff <pr> --name-only # or: git diff --name-only <base>...HEAD
5353
Map changed frontend files to URLs generically:
5454
- **Tools**: a changed `components/tools/<toolDir>/…` or `hooks/tools/<tool>/…`
5555
toolId → URL via the repo's own rule `getToolUrlPath` in
56-
[toolsTaxonomy.ts:200](frontend/editor/src/core/data/toolsTaxonomy.ts): `/` + the
56+
[toolsTaxonomy.ts:200](frontend/src/editor/core/data/toolsTaxonomy.ts): `/` + the
5757
id kebab-cased (`addPageNumbers``/add-page-numbers`).
5858
- **Pages/routes**: changed `filesPage/*``/files`, etc.
5959
- `--all`: enumerate every tool in the registry instead of just changed ones.
60-
Write `frontend/editor/screenshots/ui-diff/targets.json` =
60+
Write `frontend/screenshots/ui-diff/targets.json` =
6161
`[{ "id":"compress", "url":"/compress", "name":"Compress" }]`. This is what makes
6262
it generic - the spec never names a tool.
6363

@@ -69,20 +69,20 @@ the full viewport - or the `--scope` container if given). Ensure the harness is
6969
(node_modules + icons).
7070
```
7171
# after = current head
72-
cd frontend/editor && PR_SHOT_SIDE=after PR_SHOT_THEME=light \
72+
cd frontend && PR_SHOT_SIDE=after PR_SHOT_THEME=light \
7373
npx playwright test --project=stubbed ui-before-after.spec.ts
7474
# before = base, in an isolated worktree (copy the spec + targets.json in)
7575
git worktree add ../ba-base origin/<baseRefName> # or the merge-base
7676
# set up its frontend, copy spec + screenshots/ui-diff/targets.json across, then:
77-
cd ../ba-base/frontend/editor && PR_SHOT_SIDE=before PR_SHOT_THEME=light \
77+
cd ../ba-base/frontend && PR_SHOT_SIDE=before PR_SHOT_THEME=light \
7878
npx playwright test --project=stubbed ui-before-after.spec.ts
7979
# copy its screenshots/ui-diff/before/ back next to after/. Repeat with
8080
# PR_SHOT_THEME=dark if --theme includes dark. Remove worktree when done.
8181
```
8282

8383
### 4. Auto-diff (surface what changed)
8484
```
85-
cd frontend/editor && node <skill>/diff-shots.mjs \
85+
cd frontend && node <skill>/diff-shots.mjs \
8686
screenshots/ui-diff/before screenshots/ui-diff/after screenshots/ui-diff
8787
```
8888
Produces `diff-report.json` classifying each view `unchanged | changed | added |

.claude/skills/ui-before-after/diff-shots.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// unchanged | changed | added | removed, and CROP each changed pair to the
33
// affected region (bounding box of differing pixels + padding) - unless the
44
// change spans most of the page, in which case the full frame is kept.
5-
// Run from frontend/editor (so deps resolve):
5+
// Run from frontend (so deps resolve):
66
// node <skill>/diff-shots.mjs <beforeDir> <afterDir> [outDir]
77
// Env:
88
// DIFF_THRESHOLD min fraction of differing pixels to count as changed (default 0.001)

.claude/skills/ui-before-after/shoot-sections.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Render each .tab-section of a montage HTML into its own PNG (the PR-ready image).
2-
// Run from frontend/editor (so @playwright/test resolves):
2+
// Run from frontend (so @playwright/test resolves):
33
// node <skill>/shoot-sections.mjs <montage.html> <outDir>
44
import path from "node:path";
55
import { pathToFileURL } from "node:url";

.claude/skills/ui-walkthrough/SKILL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ current branch diff. Flags: `--fix`, `--theme light|dark|both` (default both),
2828
## What this repo gives you (use it, don't reinvent)
2929

3030
- **Stubbed Playwright project** = backend-free screenshots via `page.route()` mocks.
31-
Reference implementation: `frontend/editor/src/core/tests/stubbed/files-page-screenshots.spec.ts`.
31+
Reference implementation: `frontend/src/editor/core/tests/stubbed/files-page-screenshots.spec.ts`.
3232
It already shows the light / **dark** / **RTL** passes, JWT seeding, IndexedDB
3333
seeding, and dumping PNGs to a `screenshots/<area>/` folder. Copy its shape.
34-
- Helpers: `frontend/editor/src/core/tests/helpers/ui-helpers.ts`
34+
- Helpers: `frontend/src/editor/core/tests/helpers/ui-helpers.ts`
3535
(`uploadFiles`, `openSettings`, `waitForModalOpen`, `dismissTourTooltip`, …)
3636
and the `stub-test-base` fixtures (`autoGoto`, `seedJwt`, `viewport`).
37-
- Config: `frontend/editor/playwright.config.ts` (run from `frontend/editor/`).
37+
- Config: `frontend/playwright.config.ts` (run from `frontend/`).
3838
- Report template: [report-template.html](report-template.html) - self-contained,
3939
one big image at a time, a global light/dark slider that flips every shot,
4040
thumbnail rail, prev/next + arrow keys, and a Findings tab.
@@ -54,13 +54,13 @@ current branch diff. Flags: `--fix`, `--theme light|dark|both` (default both),
5454
Worktrees have no `node_modules` and no generated icons. From repo root:
5555
```
5656
cd frontend && npm ci # or junction main's node_modules (see memory)
57-
cd frontend/editor && node scripts/generate-icons.js
57+
cd frontend && node scripts/generate-icons.js
5858
```
5959
Kill any stale dev server first (it serves old modules):
6060
`Get-NetTCPConnection -LocalPort 5173 -State Listen | %{ Stop-Process -Id $_.OwningProcess -Force }`
6161

6262
### 3. Write the capture spec
63-
Create `frontend/editor/src/core/tests/stubbed/<feature>-walkthrough.spec.ts`,
63+
Create `frontend/src/editor/core/tests/stubbed/<feature>-walkthrough.spec.ts`,
6464
modeled on `files-page-screenshots.spec.ts`. For each enumerated view:
6565
- stub the APIs it needs, drive the UI to that state, wait on a real locator
6666
(not a fixed sleep), `await settle(page)` for Mantine portals, then
@@ -71,7 +71,7 @@ modeled on `files-page-screenshots.spec.ts`. For each enumerated view:
7171
- Name shots `NN_<view>_<theme>.png` so light/dark pair up by suffix.
7272
- Prefer **stable test-ids** over translated accessible names (RTL/i18n breaks text locators).
7373

74-
Run it: `cd frontend/editor && npx playwright test --project=stubbed <feature>-walkthrough.spec.ts`.
74+
Run it: `cd frontend && npx playwright test --project=stubbed <feature>-walkthrough.spec.ts`.
7575
Add `--project=stubbed-firefox`/`-webkit` only if cross-browser layout matters.
7676

7777
### 4. Build the report

.dockerignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ version_builds/
2626
node_modules/
2727
**/node_modules/
2828
frontend/node_modules/
29-
frontend/editor/dist/
30-
frontend/editor/playwright-report/
29+
frontend/dist/
30+
frontend/playwright-report/
3131
.npm/
3232
.yarn/
3333

3434
# Tauri/desktop builds
3535
src-tauri/target/
3636
src-tauri/dist/
37-
frontend/editor/src-tauri/target/
38-
frontend/editor/src-tauri/dist/
37+
frontend/src-tauri/target/
38+
frontend/src-tauri/dist/
3939

4040
# IDE and editor
4141
.idea/

.github/config/.files.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ frontend: &frontend
9292
# job on changes to any of these.
9393
tauri: &tauri
9494
- *ci
95-
- frontend/editor/src-tauri/**
96-
- frontend/editor/src/desktop/**
97-
- frontend/editor/tsconfig.desktop.vite.json
95+
- frontend/src-tauri/**
96+
- frontend/src/editor/desktop/**
97+
- frontend/tsconfig.desktop.vite.json
9898
- frontend/package.json
9999
- frontend/package-lock.json
100-
- frontend/editor/vite.config.ts
100+
- frontend/vite.config.ts
101101
- .github/workflows/tauri-build.yml
102102
- Taskfile.yml
103103
- .taskfiles/desktop.yml
@@ -121,9 +121,9 @@ engine: &engine
121121
generated-models: &generated-models
122122
- *ci
123123
- *openapi
124-
- frontend/editor/scripts/generate-tool-api-types.mts
125-
- frontend/editor/src/core/types/toolApiTypes.ts
126-
- frontend/editor/src/core/types/toolIO.ts
124+
- frontend/scripts/generate-tool-api-types.mts
125+
- frontend/src/editor/core/types/toolApiTypes.ts
126+
- frontend/src/editor/core/types/toolIO.ts
127127
- engine/scripts/generate_tool_models.py
128128
- engine/src/stirling/models/tool_models.py
129129
- engine/src/stirling/models/tool_io.py
@@ -135,7 +135,7 @@ licenses-frontend: &licenses-frontend
135135
- ".github/workflows/frontend-backend-licenses-update.yml"
136136
- "frontend/package.json"
137137
- "frontend/package-lock.json"
138-
- "frontend/editor/scripts/generate-licenses.js"
138+
- "frontend/scripts/generate-licenses.js"
139139

140140
licenses-backend: &licenses-backend
141141
- ".github/workflows/frontend-backend-licenses-update.yml"
@@ -146,8 +146,8 @@ licenses-backend: &licenses-backend
146146
proprietary: &proprietary
147147
- *ci
148148
- app/proprietary/**
149-
- frontend/editor/src/proprietary/**
150-
- frontend/editor/src/core/tests/enterprise/**
149+
- frontend/src/editor/proprietary/**
150+
- frontend/src/editor/core/tests/enterprise/**
151151
- testing/compose/docker-compose-keycloak-oauth.yml
152152
- testing/compose/docker-compose-keycloak-saml.yml
153153
- testing/compose/keycloak-realm-oauth.json

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ updates:
128128

129129
- package-ecosystem: cargo
130130
directories:
131-
- /frontend/editor/src-tauri
132-
- /frontend/editor/src-tauri/thumbnail-handler
133-
- /frontend/editor/src-tauri/provisioner
131+
- /frontend/src-tauri
132+
- /frontend/src-tauri/thumbnail-handler
133+
- /frontend/src-tauri/provisioner
134134
schedule:
135135
interval: "weekly"
136136
cooldown:

.github/labeler-config-srvaroa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ labels:
5151

5252
- label: 'Translation'
5353
files:
54-
- 'frontend/editor/public/locales/[a-zA-Z]{2}-[a-zA-Z\-]{2,7}/translation.toml'
54+
- 'frontend/public/locales/[a-zA-Z]{2}-[a-zA-Z\-]{2,7}/translation.toml'
5555
- 'scripts/ignore_translation.toml'
5656
- 'scripts/remove_translation_keys.sh'
5757
- 'scripts/replace_translation_line.sh'
@@ -70,8 +70,8 @@ labels:
7070

7171
- label: 'Tauri'
7272
files:
73-
- 'frontend/editor/src-tauri/**'
74-
- 'frontend/editor/src-tauri/.*'
73+
- 'frontend/src-tauri/**'
74+
- 'frontend/src-tauri/.*'
7575

7676
- label: 'engine'
7777
files:

.github/scripts/check_language_toml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515
# Sample for Windows:
16-
# python .github/scripts/check_language_toml.py --reference-file frontend/editor/public/locales/en-US/translation.toml --branch "" --files frontend/editor/public/locales/de-DE/translation.toml frontend/editor/public/locales/fr-FR/translation.toml
16+
# python .github/scripts/check_language_toml.py --reference-file frontend/public/locales/en-US/translation.toml --branch "" --files frontend/public/locales/de-DE/translation.toml frontend/public/locales/fr-FR/translation.toml
1717

1818
import argparse
1919
import glob
@@ -308,7 +308,7 @@ def check_for_differences(reference_file, file_list, branch, actor):
308308
report.append("## ❌ Overall Check Status: **_Failed_**")
309309
report.append("")
310310
report.append(
311-
f"@{actor} please check your translation if it conforms to the standard. Follow the format of [en-US/translation.toml](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/frontend/editor/public/locales/en-US/translation.toml)"
311+
f"@{actor} please check your translation if it conforms to the standard. Follow the format of [en-US/translation.toml](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/frontend/public/locales/en-US/translation.toml)"
312312
)
313313
else:
314314
report.append("## ✅ Overall Check Status: **_Success_**")

0 commit comments

Comments
 (0)