10 Commits

Author SHA1 Message Date
juanatsap 69012bb1ae test: add comprehensive Go test suite with ~75% coverage
New test files:
- config/config_test.go (100% coverage)
- constants/constants_test.go (100% coverage)
- httputil/response_test.go (100% coverage)
- validation/rules_test.go (91.9% coverage)
- middleware/logger_test.go, security_test.go, security_logger_test.go
- handlers/errors_test.go

Updated documentation:
- doc/27-GO-TESTING.md: Complete testing guide
- doc/00-GO-DOCUMENTATION-INDEX.md: Added testing section
- doc/01-ARCHITECTURE.md: Updated package structure
- doc/DECISIONS.md: Added ADR-004 caching decision
- PROJECT-MEMORY.md: Added Go testing section
2025-12-06 17:51:20 +00:00
juanatsap 404748afb5 feat: redesign CMD+K button as macOS Spotlight-style search bar
Replace simple search button with search bar design in action bar:
- Semi-transparent styling integrated with dark action bar
- Keyboard shortcut indicators (⌘ K) shown as individual kbd elements
- Search icon and "Search" text for better discoverability
- Responsive: kbd keys hidden on mobile (<900px)
- Remove unused cmd-k-button.html partial template

Update test to verify new search bar structure (styling, kbd elements, icon).
2025-12-04 12:59:16 +00:00
juanatsap 7727405c25 docs: fix broken links, update versions and test counts
5-expert orchestrated cleanup audit findings:
- Fix broken security doc links (docs/SECURITY.md → doc/9-SECURITY.md)
- Update Go version requirement (1.21+ → 1.25.1+)
- Correct test count (39 → 44 test files)
- Fix ZOOM_IMPLEMENTATION.md filename reference
- Update last modified dates to 2025-12-02
2025-12-02 21:02:57 +00:00
juanatsap 949c9a0351 docs: Consolidate documentation into single doc/ folder
- Move docs/ contents to doc/ with proper numbering:
  - CONTACT-FORM-QUICKSTART.md → 17-CONTACT-FORM.md
  - SECURITY-AUDIT-REPORT.md → 18-SECURITY-AUDIT.md
  - SECURITY.md → 19-SECURITY-IMPLEMENTATION.md
- Delete duplicate/redundant files from docs/:
  - CMD-K-COMMAND-BAR.md (duplicate of 16-CMD-K-API.md)
  - CONTACT_FORM_IMPLEMENTATION.md (overlaps with quickstart)
  - SECURITY-IMPLEMENTATION-SUMMARY.md (summary of audit)
- Update doc/README.md with new document references
- Update test counts to 39 test files across all READMEs
- Update all "Last Updated" dates to 2025-12-01
- Add new API endpoints documentation (text, cmd-k, contact, toggles)
- Update PROJECT-MEMORY.md with new features and correct paths
2025-12-01 13:30:48 +00:00
juanatsap 925a95c1b4 refactor: externalize navigation handlers and fix hyperscript syntax errors
- Created keyboard._hs as reference documentation (inline handler in body tag)
- Externalized 9 hamburger menu navigation links to scrollToSection()
- Added scrollToSection() as JavaScript function (CSP-safe, no eval needed)
- Restored original keyboard handler format in body tag (working correctly)
- Removed problematic navigation._hs (had syntax/CSP issues)
- Added Rule 4 to HYPERSCRIPT-RULES.md on event handler externalization
- Updated PROJECT-MEMORY.md with externalization guidelines

Key learnings:
- Complex event handlers that inspect event properties must stay inline
- JavaScript functions avoid CSP unsafe-eval restrictions
- Navigation successfully externalized: 9 links → 1 function (91% reduction)
2025-11-20 09:46:06 +00:00
juanatsap 4b01134584 chore: delete redundant test archive - enforce zero redundancy policy
Deleted entire tests/archive/ directory (17+ test files, 188KB)
- All archive tests were 100% redundant with active tests
- Archive contained: toggles, zoom, hyperscript, keyboard, integration, misc tests
- Active tests (0-11) provide superior coverage

Updated TEST-SUMMARY.md:
- Removed archive references
- Added "Test Philosophy" section
- Updated test count to reflect deletion
- Emphasized zero redundancy policy

Coverage mapping (archive → active):
- toggles/* → 1-toggles.test.mjs 
- zoom/* → 0-zoom.test.mjs + 10-zoom-persistence + 11-zoom-ui-exclusion 
- hyperscript/* → 3-hyperscript.test.mjs + 9-hyperscript-def-limit 
- keyboard/* → 2-keyboard-shortcuts.test.mjs 
- integration/* → All active tests combined 
- misc/* → Various active tests 

Philosophy: If a test doesn't provide unique value, it doesn't exist.
2025-11-17 18:04:07 +00:00
juanatsap 5d5b050029 feat: confirm no hyperscript def limit + update documentation
MAJOR FINDING: Latest hyperscript version has NO 3 def statement limit!

Test Results (tests/mjs/9-hyperscript-def-limit.test.mjs):
 1 def statement - PASS
 2 def statements - PASS
 3 def statements - PASS
 4 def statements - PASS (beyond historical limit)
 5 def statements - PASS (well beyond limit)

Changes:
1. Created comprehensive def limit test
   - tests/mjs/9-hyperscript-def-limit.test.mjs
   - Tests 1, 2, 3, 4, 5 def statements
   - Verifies both parsing and function execution
   - Provides detailed analysis and recommendations

2. Updated PROJECT-MEMORY.md
   - Section 2: Changed from "NEEDS RETESTING" to "REMOVED IN LATEST VERSION"
   - Documented test findings and historical context
   - Added migration plan for hyperscript file organization
   - Updated test count to 10 systematic tests

3. Updated doc/HYPERSCRIPT-RULES.md
   - Rule 2: Removed 3 def limit warning
   - Documented historical context (Hyperscript 0.9.12 had limit)
   - New best practice: Organize by category in separate files
   - Added recommended file structure

Impact:
- Can now use unlimited def statements in hyperscript
- Enables cleaner architecture with category-based organization
- Allows migration from cv-functions.js back to hyperscript
- Better alignment with hypermedia/server-driven pattern

Next Steps:
- Create organized hyperscript file structure
- Migrate toggle functions from JavaScript to hyperscript
- Migrate hover sync functions to hyperscript
- Test each migration thoroughly
2025-11-17 15:02:30 +00:00
juanatsap 19a19bdf78 docs: update PROJECT-MEMORY.md - hover sync bug FIXED 2025-11-17 14:37:38 +00:00
juanatsap ee06b957f9 docs: correct PROJECT-MEMORY.md with accurate architecture info
Critical corrections based on user feedback:

1. Hyperscript Parser Limit (Section 2)
   - Changed status to "NEEDS RETESTING" with latest hyperscript version
   - 3 def statement limit may no longer exist after upgrade
   - TODO: Test if limit still applies with current version

2. Toggle + Hover Synchronization (Section 3)
   - Clarified toggle checkboxes WORK perfectly 
   - Documented HOVER SYNC BUG for PDF/Print buttons 
   - Action bar hover doesn't sync with menu button hover
   - Added file references and bug details
   - Test coverage gap identified

3. Real-Time Rendering + Persistence (Section 4)
   - Corrected misconception: BOTH DOM and localStorage required
   - Not mutually exclusive - need instant feedback AND persistence
   - Added clear examples of correct vs incorrect implementation

4. Architecture - Tech Stack
   - CORRECTED: Backend is Go (NOT Bun/Hono)
   - Go 1.21+ with standard library net/http
   - Bun is ONLY test runner, not the runtime
   - Added complete frontend stack details

5. File Organization
   - CORRECTED: Actual Go project structure
   - main.go entry point (v1.1.0)
   - internal/ package organization
   - Complete template hierarchy
   - Critical files list updated

Fixes hallucinated architecture information and provides accurate
technical foundation for future developers.
2025-11-17 14:22:23 +00:00
juanatsap 8b6620f93b docs: add PROJECT-MEMORY.md - critical developer knowledge
Comprehensive memory document capturing:
-  Non-negotiable rules (icon naming, hyperscript limits, toggle sync)
-  Historical bugs and fixes (icon toggle, parser crash, desync)
-  Architecture decisions (HTMX+Hyperscript, Bun, file organization)
-  Standard patterns (toggles, keyboard shortcuts, hyperscript usage)
-  Development workflow (test-first, regression tests)
-  Common operations (adding toggles, debugging)
-  Lessons learned (naming, testing, framework limits)

This document is the second most important after tests/README.md
Read before making ANY changes to the project
2025-11-17 13:51:17 +00:00