Skip to content

Chore/remove local styling md#70

Open
ghostleek wants to merge 4 commits intomainfrom
chore/remove-local-styling-md
Open

Chore/remove local styling md#70
ghostleek wants to merge 4 commits intomainfrom
chore/remove-local-styling-md

Conversation

@ghostleek
Copy link
Copy Markdown
Contributor

No description provided.

ghostleek and others added 3 commits March 4, 2026 23:39
Make the seeder idempotent: scripts/seed-apps.ts now upserts apps (onConflictDoUpdate) and returns app IDs instead of skipping existing records, and it updates updatedAt. Bump rules are cleared per-app before reinserting so the JSON remains authoritative, and apps without a DB id are skipped. Update seed data (data/apps-seed.json) to add new teaching apps and adjust featured flags. Minor import tweaks (added eq/asc) to support the changes.
Design system docs moved to string/STYLING.md so all String apps
can reference it via the parent CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ghostleek ghostleek requested a review from Copilot April 8, 2026 13:25
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
string-v2 Ready Ready Preview, Comment Apr 8, 2026 1:34pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the local styling/design-system markdown document and updates seeding + documentation to better reflect current app directory/profile behavior, while also extending the seed dataset.

Changes:

  • Deleted STYLING.md from the repo.
  • Updated scripts/seed-apps.ts to upsert apps from apps-seed.json and to reseed bump rules per app.
  • Updated data/apps-seed.json with new apps and adjusted featured flags; updated claude.md workflow wording; adjusted imports in api/apps.ts.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
STYLING.md Removed local design system documentation file.
scripts/seed-apps.ts Switched app seeding to upsert; bump rules now cleared + reinserted per app.
data/apps-seed.json Added new app entries; adjusted featured presence for some apps.
claude.md Updated workflow text around where apps appear and approval visibility.
api/apps.ts Updated drizzle import list (currently introduces an unused import).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/apps.ts Outdated
import { drizzle } from 'drizzle-orm/neon-http';
import { apps, featuredApps, bumpRules, appSubmissions } from '../src/db/schema';
import { eq, desc, and, gte, lte } from 'drizzle-orm';
import { eq, desc, and, gte, lte, asc } from 'drizzle-orm';
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asc is imported but not used in this file. With noUnusedLocals: true in tsconfig, this will fail TypeScript compilation—remove asc or use it in an orderBy(...) call.

Suggested change
import { eq, desc, and, gte, lte, asc } from 'drizzle-orm';
import { eq, desc, and, gte, lte } from 'drizzle-orm';

Copilot uses AI. Check for mistakes.
Comment thread scripts/seed-apps.ts
Comment on lines 81 to +88
for (const app of seedData.apps) {
if (app.bump_rules && appIdMap[app.slug]) {
if (!appIdMap[app.slug]) continue;
const appId = appIdMap[app.slug];

// Clear existing rules for this app before reinserting
await db.delete(bumpRules).where(eq(bumpRules.appId, appId));

if (app.bump_rules) {
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seeder now unconditionally deletes all bump rules for every app (even when app.bump_rules is missing), which can wipe manually-managed rules and makes db:seed destructive. Consider only deleting/replacing rules when bump rules are present in the JSON (or add an explicit --force/confirmation flag) to avoid accidental data loss.

Copilot uses AI. Check for mistakes.
Comment thread claude.md
Comment on lines +425 to +427
6. **App shows immediately on user's personal profile (`/[slug]`)**
7. Admin reviews via Drizzle Studio
8. Approved → visible globally in app directory
8. **Approved** → visible globally on main `string.sg` homepage and searchable in app directory
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR removes STYLING.md, but claude.md still lists STYLING.md in the repository tree earlier in the document. Update that section to avoid stale documentation references (or adjust the PR scope if the file is meant to remain).

Copilot uses AI. Check for mistakes.
- api/apps.ts: keep normalizeOpalLogo import from main (drop unused asc);
  fix dbApps → officialApps typo introduced by merge
- data/apps-seed.json: keep logo_url on LangBuddy from main and retain
  Write Formula Game, String Buy, String Diagrams entries from this branch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants