Skip to content

fix: resolve runtime errors and establish testing infrastructure#58

Merged
velonone merged 2 commits into
mainfrom
claude/testing-ml75txm7ocaphwkt-Li2we
Feb 3, 2026
Merged

fix: resolve runtime errors and establish testing infrastructure#58
velonone merged 2 commits into
mainfrom
claude/testing-ml75txm7ocaphwkt-Li2we

Conversation

@velonone
Copy link
Copy Markdown
Owner

@velonone velonone commented Feb 3, 2026

  • Fix ReferenceError: themeKey is not defined in NewWorkspace EditorArea
  • Unify theme type system (ThemeMode now includes 'soft-dark')
  • Fix storage key inconsistency (vspec_theme -> vspec-theme)
  • Fix duplicate tiptap extension warning (disable link/underline in StarterKit v3)
  • Remove maskable icon purpose from PWA manifest (no background frame on logo)
  • Center login page vertically on mobile with flexbox
  • Set up Vitest + React Testing Library + jsdom
  • Add 70 tests across storage, workspaceStore, and markdown conversion
  • Add test step to CI/CD pipeline

https://claude.ai/code/session_01MER5jwqiMikPxH1DoS3WKs

Pull Request

Description

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style/UI update (changes that don't affect functionality)
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test update

Related Issues

Changes Made

Screenshots/Videos

Before

After

Testing

  • Tested on Chrome
  • Tested on Firefox
  • Tested on Safari
  • Tested on mobile devices
  • Tested with different themes

Design System Compliance

  • Follows VSPEC design system guidelines
  • Uses brand color #7C85ED appropriately (sparingly)
  • Uses grayscale system for non-accent elements
  • No Tailwind font classes unless specifically needed
  • Icons verified to exist in Lucide React
  • Follows glass morphism patterns where applicable
  • Maintains restrained, professional aesthetic

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have tested that my changes work as expected
  • I have checked for responsive design issues
  • I have updated CHANGELOG.md (if applicable)

Additional Notes

Summary by CodeRabbit

Release Notes

  • New Features

    • Added soft-dark theme variant alongside existing light, dark, and sepia themes.
  • Style

    • Improved login page layout centering and responsiveness.
  • Tests

    • Added comprehensive test coverage for core functionality.
  • Chores

    • Updated development dependencies with testing framework.
    • Cleaned up manifest configuration.

- Fix ReferenceError: themeKey is not defined in NewWorkspace EditorArea
- Unify theme type system (ThemeMode now includes 'soft-dark')
- Fix storage key inconsistency (vspec_theme -> vspec-theme)
- Fix duplicate tiptap extension warning (disable link/underline in StarterKit v3)
- Remove maskable icon purpose from PWA manifest (no background frame on logo)
- Center login page vertically on mobile with flexbox
- Set up Vitest + React Testing Library + jsdom
- Add 70 tests across storage, workspaceStore, and markdown conversion
- Add test step to CI/CD pipeline

https://claude.ai/code/session_01MER5jwqiMikPxH1DoS3WKs
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
vspec Ready Ready Preview, Comment Feb 3, 2026 10:50pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 3, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
📝 Walkthrough

Walkthrough

The PR introduces comprehensive testing infrastructure using Vitest, adds test suites for markdown conversion and storage utilities, implements a new "soft-dark" theme variant, updates a localStorage key naming convention in ThemeSwitcher, and makes minor layout and component configuration adjustments.

Changes

Cohort / File(s) Summary
Testing Infrastructure
.github/workflows/performance.yml, package.json, vitest.config.ts, src/__tests__/setup.ts
Adds Vitest configuration with jsdom environment, test scripts (test, test:watch, test:coverage), testing dependencies (@testing-library/react, @testing-library/jest-dom, vitest, jsdom), and integrates test execution into the performance workflow. Setup file mocks localStorage, sessionStorage, and window.matchMedia for non-browser test environment.
Test Suites
src/__tests__/markdownConversion.test.ts, src/__tests__/storage.test.ts, src/__tests__/workspaceStore.test.ts
New comprehensive test suites covering markdown conversion utilities (HTML↔Markdown mappings and round-trip integrity), storage API (STORAGE_KEYS, getStorageItem, setStorageItem, auth/onboarding helpers), and WorkspaceStore state management (theme, layout, tabs, language, AI chat, search functionality).
Theme Variant Enhancement
src/app/stores/workspaceStore.ts, src/app/pages/NewWorkspace.tsx, src/app/components/ThemeSwitcher.tsx
Introduces "soft-dark" theme variant to ThemeMode type, normalizes effectiveTheme to 'dark' when theme is 'dark' or 'soft-dark', updates dark theme detection logic in preview mode, and corrects localStorage key from vspec_theme to vspec-theme for persistence consistency.
Component Updates
src/app/components/workspace/RichTextEditor.tsx, src/app/pages/LoginPage.tsx
Disables link and underline extensions in RichTextEditor's StarterKit configuration, and updates LoginPage container layout to use flexbox for centered vertical alignment.
Manifest Cleanup
public/manifest.json
Removes duplicate icon entry with maskable purpose from the manifest.

Poem

🐰 With tests now in place, our code runs so neat,
A soft-dark theme blooms, completion so sweet,
From vitest's embrace, coverage takes flight,
Storage and workspace glow in the light! ✨

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

📊 Performance Report

Metric Value
Bundle Size 4.00 KB
Status ✅ Passing

View detailed Lighthouse report in artifacts.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25fe498d11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 1409 to 1411
<div
className={`prose prose-lg max-w-none ${themeKey === 'dark' ? 'prose-dark' : ''}`}
className={`prose prose-lg max-w-none ${(theme === 'dark' || theme === 'soft-dark') ? 'prose-dark' : ''}`}
style={{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use effective theme for preview typography

When the workspace theme is set to auto, effectiveTheme can be dark while theme remains auto. This class check now keys off theme, so the preview never applies prose-dark in auto‑dark mode. The typography plugin will keep dark text styles, which becomes hard to read against the dark background used for auto‑dark. Consider basing the class on effectiveTheme (or passing themeKey) so auto‑dark renders with the dark prose palette.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

📊 Performance Report

Metric Value
Bundle Size 4.00 KB
Status ✅ Passing

View detailed Lighthouse report in artifacts.

@velonone velonone merged commit 0db5c89 into main Feb 3, 2026
4 checks passed
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