Skip to content

Clean up tech stack descriptions and improve validation/UX - #114

Open
injoon5 wants to merge 1 commit into
mainfrom
claude/admiring-hopper-v2gs5a
Open

Clean up tech stack descriptions and improve validation/UX#114
injoon5 wants to merge 1 commit into
mainfrom
claude/admiring-hopper-v2gs5a

Conversation

@injoon5

@injoon5 injoon5 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Removes hardcoded tech stack descriptions from the home page loader, improves comment text validation and trimming, enhances RSS feed generation, fixes accessibility issues, and updates documentation to reflect recent schema and auth changes.

Key Changes

Home Page (src/routes/+page.ts)

  • Removed 60+ lines of hardcoded techstackDescriptions object that was loaded but never used
  • Simplified return value to only export posts, projects, and techstack

Comment Validation (src/lib/server/validation.ts & convex/comments.js)

  • Moved .trim() before length validation in Zod schemas so whitespace-only comments are properly rejected
  • Added server-side text trimming in create and applyEdit mutations to enforce consistency
  • Prevents edge cases where trailing spaces could cause "too long" errors after trimming

RSS Feed (src/routes/internal/rss.xml/+server.ts)

  • Improved cleanText() to remove code blocks and inline code before other markdown cleanup
  • Fixed channel <link> to point to website root (https://www.injoon5.com) per RSS 2.0 spec instead of feed URL
  • Added <guid> element to each item for better feed reader compatibility
  • Reordered markdown stripping to handle links by keeping label text

Accessibility & UX

  • Fixed comment voting animation to check both votingAnim.id and votingAnim.side to prevent showing spinner on wrong comment
  • Updated SeriesList.svelte to use undefined instead of empty string for current post link (prevents reload) and added aria-current="page"
  • Added aria-pressed attribute to language switcher buttons
  • Improved /now page loading state messaging
  • Fixed error page message for projects 404

Documentation (CLAUDE.md)

  • Updated blog/project routes to note SSR for language/cookie handling
  • Removed legacy /api/comments/[id]/reply route from docs
  • Expanded Convex schema table with new denormalized count tables (commentUrlCounts, likeCounts, migrationMeta)
  • Updated auth section to reflect cookie-based session authentication with HMAC verification
  • Added IP_HASH_SECRET to environment variables section
  • Clarified admin auth flow and cookie signing

Minor Fixes

  • Removed unnecessary <meta charset="UTF-8" /> from home page (SvelteKit handles this)
  • Updated resolvePublished() to only count published English versions toward EN badge

https://claude.ai/code/session_01Gc2UdyWBUbdqkiR9uGnPaU

Backend:
- Enforce the 1-200 char comment limit (with trim) in the Convex
  applyEdit mutation — the public editComment action could bypass the
  SvelteKit/Zod layer entirely. Trim text in create for the same reason.
- Reorder Zod .trim() before .min()/.max() so whitespace-only comments
  are rejected and trailing spaces don't push valid text over the limit.

RSS feed:
- Channel <link> pointed at the non-existent /rss.xml; use the site URL
  per the RSS 2.0 spec.
- Add <guid> permalinks so readers can de-duplicate items.
- Keep link labels (instead of deleting whole links), strip heading and
  emphasis markers in item descriptions — link-heavy posts previously
  produced empty bullet lists.

UI papercuts:
- Vote spinner showed on the wrong comment: the in-flight check ignored
  which comment the click animation belonged to.
- /now page showed "Loading..." forever when the page had no content.
- SeriesList rendered the current post as a clickable empty-href link
  that reloaded the page; now href-less with aria-current.
- EN badge appeared for posts whose English version is unpublished.
- LanguageSwitcher buttons now expose aria-pressed.
- Remove duplicate <meta charset> from the home page head.
- Distinct 404 copy for /projects listing vs a project page.

Cleanup:
- Drop the unused techstackDescriptions object (~4 KB of dead JSON
  serialized into the prerendered home page payload).
- Correct stale CLAUDE.md claims (admin secret is never sent to the
  browser, detail pages are SSR not prerendered, schema table, removed
  legacy reply route, document IP_HASH_SECRET).

https://claude.ai/code/session_01Gc2UdyWBUbdqkiR9uGnPaU
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 10, 2026 9:44am

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