Skip to content

Commit 7dcc134

Browse files
Copilotasperpharma
andcommitted
fix: apply lzdy branch improvements - Dr. Bot branding, credential fallback, new scripts, skills
Co-authored-by: asperpharma <252395498+asperpharma@users.noreply.github.com>
1 parent aa34d42 commit 7dcc134

13 files changed

Lines changed: 619 additions & 11 deletions

File tree

.agents/skills/code-connect-components/SKILL.md

Lines changed: 332 additions & 0 deletions
Large diffs are not rendered by default.

.cursor/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
},
66
"slack": {
77
"enabled": true
8+
},
9+
"figma": {
10+
"enabled": true
11+
},
12+
"cursor-team-kit": {
13+
"enabled": true
814
}
915
}
1016
}

.github/workflows/azure-webapps-node.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ permissions:
3333
jobs:
3434
build:
3535
runs-on: ubuntu-latest
36+
# Skip if Azure credentials are not configured
37+
if: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE != '' }}
3638
steps:
3739
- uses: actions/checkout@v4
3840

.github/workflows/sync-file-changes-to-lovable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070
echo "Sending file changes to Lovable..."
7171
curl -X POST "$LOVABLE_WEBHOOK_URL" \
7272
-H "Content-Type: application/json" \
73-
-d "$PAYLOAD"
73+
-d "$PAYLOAD" || echo "Warning: Lovable webhook call failed (non-fatal)."

.github/workflows/sync-issues-prs-to-lovable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ jobs:
7070
)
7171
curl -s -X POST "$LOVABLE_WEBHOOK_URL" \
7272
-H "Content-Type: application/json" \
73-
-d "$PAYLOAD"
73+
-d "$PAYLOAD" || echo "Warning: Lovable webhook call failed (non-fatal)."
7474
echo "Done."

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,3 +302,52 @@ For more bulk product upload examples and complete payload structures, see [docs
302302
- **[docs/DEPLOYMENT_TEMPLATE.md](docs/DEPLOYMENT_TEMPLATE.md)** - Deployment templates, environment variables, concrete bulk-product-upload sample payloads
303303
- **[docs/PRE_LAUNCH_CHECKLIST.md](docs/PRE_LAUNCH_CHECKLIST.md)** - Pre-deployment checklist including §5 secrets configuration and POST response interpretation
304304
- **[.github/workflows/deploy-health-check.yml](.github/workflows/deploy-health-check.yml)** - Automated health checks on deployment
305+
306+
## Sync Check and applyToAllProfiles
307+
308+
**Sync check (SNC)** — Verifies frontend health and Beauty Assistant (brain) connectivity:
309+
310+
```sh
311+
npm run sync:check
312+
```
313+
314+
Other scripts: `npm run health` (frontend + Beauty Assistant), `npm run brain` (edge function / Beauty Assistant only).
315+
316+
**applyToAllProfiles** — Cursor/VS Code user setting so chosen options apply to every profile. In **User** `settings.json` (File → Preferences → Settings → Open Settings JSON), add:
317+
318+
```json
319+
"workbench.settings.applyToAllProfiles": [
320+
"workbench.editorAssociations",
321+
"chat.mcp.access",
322+
"npm.scriptExplorerAction",
323+
"update.channel"
324+
]
325+
```
326+
327+
Include `update.channel` if you want the same update channel (e.g. stable) across all profiles.
328+
329+
**commitDirectlyWarning** — Avoid committing directly to the default branch when branch protection or Windows path issues apply; use a feature branch and PR.
330+
331+
## Available scripts
332+
333+
| Command | What it does |
334+
|---------|--------------|
335+
| `npm run dev` | Start Vite dev server |
336+
| `npm run build` | Production build |
337+
| `npm run build:dev` | Build in development mode |
338+
| `npm run lint` | Run ESLint |
339+
| `npm run lint:fix` | ESLint with auto-fix |
340+
| `npm run typecheck` | TypeScript check (no emit) |
341+
| `npm run check` | Lint + typecheck |
342+
| `npm run check:all` | Lint + typecheck + build |
343+
| `npm run preview` | Serve production build |
344+
| `npm run test` | Run Vitest once |
345+
| `npm run test:watch` | Vitest watch mode |
346+
| `npm run test:bulk-upload` | Bulk upload validation script |
347+
| `npm run health` | Frontend + Beauty Assistant health check |
348+
| `npm run brain` | Beauty Assistant (brain) connectivity check |
349+
| `npm run sync` | Sync Shopify product catalog to Supabase |
350+
| `npm run sync:check` | Frontend + brain sync check |
351+
| `npm run sync:dry` | Shopify catalog sync (dry run) |
352+
| `npm run sync:publish` | Shopify catalog sync + publish |
353+

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
"preview": "vite preview",
1717
"test": "vitest run",
1818
"test:watch": "vitest",
19+
"test:bulk-upload": "node scripts/test-bulk-upload-validation.mjs",
20+
"health": "node scripts/health-check.js",
21+
"brain": "node scripts/brain-check.js",
1922
"sync": "tsx scripts/sync-shopify-catalog.ts",
23+
"sync:check": "node scripts/sync-check.js",
2024
"sync:dry": "tsx scripts/sync-shopify-catalog.ts --dry-run",
2125
"sync:publish": "tsx scripts/sync-shopify-catalog.ts --publish"
2226
},

scripts/brain-check.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Asper Beauty Shop — Brain (Beauty Assistant) connectivity check.
4+
* Run: npm run brain
5+
*/
6+
7+
const BRAIN_URL =
8+
"https://qqceibvalkoytafynwoc.supabase.co/functions/v1/beauty-assistant";
9+
10+
async function main() {
11+
console.log("Asper Beauty Shop — Brain connectivity check\n");
12+
try {
13+
const res = await fetch(BRAIN_URL, { method: "GET" });
14+
const text = await res.text();
15+
let body;
16+
try {
17+
body = JSON.parse(text);
18+
} catch {
19+
body = text;
20+
}
21+
// Only 2xx is success. 401 (auth) and 405 (method) must fail so misconfiguration is visible.
22+
if (res.ok) {
23+
console.log(" ✓ Beauty Assistant (Dr. Bot):", res.status);
24+
if (body && typeof body === "object") {
25+
console.log(" ", JSON.stringify(body, null, 2));
26+
} else if (text) {
27+
console.log(" ", text.slice(0, 200));
28+
}
29+
console.log("");
30+
process.exit(0);
31+
} else {
32+
console.log(" ✗ Beauty Assistant:", res.status, body || text);
33+
process.exit(1);
34+
}
35+
} catch (err) {
36+
console.log(" ✗ Error:", err.message);
37+
process.exit(1);
38+
}
39+
}
40+
41+
main();

scripts/sync-check.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Asper Beauty Shop — Sync check (frontend + brain connectivity).
4+
* Run: npm run sync:check
5+
*/
6+
7+
const FRONTEND_HEALTH = "https://asperbeautyshop-com.lovable.app/health";
8+
const BRAIN_URL =
9+
"https://qqceibvalkoytafynwoc.supabase.co/functions/v1/beauty-assistant";
10+
11+
async function fetchStatus(name, url) {
12+
try {
13+
const res = await fetch(url, { method: "GET" });
14+
return { name, status: res.status, ok: res.ok };
15+
} catch (err) {
16+
return { name, status: null, ok: false, error: err.message };
17+
}
18+
}
19+
20+
async function main() {
21+
console.log("Asper Beauty Shop — Sync check\n");
22+
23+
const [frontend, brain] = await Promise.all([
24+
fetchStatus("Frontend /health", FRONTEND_HEALTH),
25+
fetchStatus("Beauty Assistant (brain)", BRAIN_URL),
26+
]);
27+
28+
const frontendOk = frontend.status === 200;
29+
const brainOk = brain.status === 200;
30+
31+
console.log(
32+
frontendOk ? " ✓" : " ✗",
33+
frontend.name + ":",
34+
frontend.status || frontend.error
35+
);
36+
console.log(
37+
brainOk ? " ✓" : " ✗",
38+
brain.name + ":",
39+
brain.status || brain.error
40+
);
41+
console.log("");
42+
43+
process.exit(frontendOk && brainOk ? 0 : 1);
44+
}
45+
46+
main();

skills-lock.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": 1,
3+
"skills": {
4+
"code-connect-components": {
5+
"source": "figma/mcp-server-guide",
6+
"sourceType": "github",
7+
"computedHash": "7d61e4f1fda72024bbe1356eb8e84585870e8c461a1a9eb69a32f4e2c9e1beed"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)