Skip to content

chore: sync develop to main - #200

Merged
ayoub3bidi merged 97 commits into
mainfrom
develop
Jul 16, 2026
Merged

chore: sync develop to main#200
ayoub3bidi merged 97 commits into
mainfrom
develop

Conversation

@ayoub3bidi

@ayoub3bidi ayoub3bidi commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Contribution workflow

  • Base branch is main: This PR merges develop into main to push an early production update.
  • Guidelines and docs: All changes have been reviewed through PRs targeting develop with full CI gates.
  • This template: Filled in below.

Description

Early production sync — pushing accumulated develop work to main ahead of the full v0.5.0 release cycle.

180 commits across 23 merged PRs (#175#199), touching 497 files with +42,982 / -3,194 lines.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🧪 Test addition or improvement
  • 🔧 Chore (maintenance, dependencies, etc.)
  • 📚 Documentation update
  • 🎨 Style/UI improvement
  • ⚡ Performance improvement
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related Issues

Supersedes all PRs #175#199 merged into develop.

Changes Made

New Algorithm Categories & Algorithms

  • Tree Traversal (6 algorithms): Inorder, Preorder, Postorder, Level Order, Zigzag Level Order, Morris — with dedicated TreeVisualizer and useTreeTraversalVisualization hook
  • Graph Algorithms (7 algorithms): Topological Sort, Kahn, Kruskal, Prim, Tarjan, Kosaraju, Floyd-Warshall — with GraphAlgorithmCategoryVisualizer, GraphAlgorithmMatrixVisualizer, node-link/matrix routing, and 18 preset test scenarios
  • Algorithm count expanded from ~25 to 45 algorithms across 5 categories
  • Pseudocode tab with i18n support (EN/FR/AR), syntax highlighting, and localize engine

Authentication & User System

  • Optional Google sign-in via Supabase Auth + Google Identity Services (PKCE popup)
  • AuthProvider, RequireAuth, BannedScreen components
  • Profile Settings page (/settings/profile) with display name, avatar customization (DiceBear), tabbed UI
  • Service layer: authService, profileService, entitlementService, accessService, googleTokenExchange
  • Postgres RLS policies, advisory locks, Supabase Edge Functions (before-signup, post-signup, platform-access, delete-account)
  • Tiered access: Anonymous (limited), Free (full) — gated features via SignInPromptModal

Features

  • Favorites & Notes: Per-algorithm favorites (up to 20) and study notes with autosave, stored in Supabase
  • Pro Waitlist: Banner, enrollment, attribution tracking, welcomed_at state
  • Video Export: Extended to graph algorithms and tree traversal; daily abuse guard for free tier
  • Theme Switch Sound: Semantic audio feedback on theme toggle
  • Legal Pages: Privacy Policy, Terms of Use with deep-link anchor support
  • Agent Readiness: .well-known/agent-card.json, MCP endpoint, WebMCP support

Infrastructure

  • Cloudflare Workers migration: wrangler.jsonc, deploy/preview workflows, auto-cleanup on PR close
  • CI: OSV-Scanner replacing broken pnpm audit, Semgrep SAST, preview cleanup workflow
  • Supabase: 11 new migrations, keep-alive workflow, edge function deployment pipeline
  • Removed all Netlify traces

UI/UX

  • Phosphor Icons migration (from Lucide)
  • Simplified header on non-/app pages, context-aware logo navigation
  • Code Panel UX enhancements (run/reset, output console improvements)
  • Insight Panel backdrop fix, footer version pill cleanup
  • Sign-in gating with pale styling for 5 premium features

Testing

  • 151 test files (~1,817 tests) — extensive coverage for new algorithms, auth, favorites, notes, services
  • Mock infrastructure: supabaseMock, framerMotionMock, soundManagerMock

Testing

  • All existing tests pass (pnpm test:run)
  • New tests added for new functionality
  • Manual testing completed
  • Cross-browser testing (if UI changes)

Test Results

All PRs were gated by CI (lint → format → test:coverage → build) before merge.

Code Quality

  • Code follows the project's coding standards
  • ESLint passes (pnpm lint)
  • Prettier formatting applied (pnpm format)
  • No console errors or warnings
  • Code is properly documented with JSDoc (if applicable)

Performance Impact

  • No performance impact
  • Performance improved

Accessibility

  • Keyboard navigation works correctly
  • Screen reader compatibility maintained
  • Color contrast meets WCAG guidelines
  • Focus indicators are visible

Breaking Changes

  • None

Checklist

  • I have completed the Contribution workflow checklist at the top of this template
  • My code follows the project's style guidelines
  • 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 added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

This is an early production sync — v0.5.0 development continues on develop.

PRs included in this merge:

PR Title Category
#175 Ascending toggle button & pseudocode tab Feature
#176 Tree traversal category (6 algorithms) Feature
#177 Graph algorithms category (7 algorithms) Feature
#178 Move sound button to control panel Fix
#179 Quick fixes Fix
#180 Migrate Lucide to Phosphor Icons Refactor
#181 Legal & privacy launch Feature
#182 Phase 0 security hardening Chore
#183 Cloudflare Workers migration Chore
#185 Wrangler config update Chore
#187 Cloudflare infrastructure (deploy/preview) Feature
#188 Fix CSP for Tone.js, Monaco, Pyodide Fix
#189 PR preview auto-cleanup Feature
#190 Agent readiness (MCP, WebMCP) Feature
#191 Code panel UX & export CSP Fix
#192 Supabase auth + Google Identity Services Feature
#193 Auth consolidation (sign-in gating) Feature
#194 Small tweaks (privacy/terms, header) Fix
#195 Keep Supabase alive workflow Chore
#196 Profile settings page Feature
#197 Feature-gating, video export, theme sound Feature
#198 Favorites & notes Feature
#199 Pro waitlist & security foundation Feature

Reviewer Guidelines:

  • Check that all tests pass
  • Verify code follows project standards
  • Test the changes locally
  • Review for security implications
  • Ensure documentation is updated

chore: Cloudflare migration polish — Netlify cleanup, CSP, Pyodide CDN
…r AudioContext creation

- Add blob: to script-src and connect-src for Tone.js v15 AudioWorklet
- Add gateway.umami.is to connect-src for Umami Cloud analytics
- Add cdn.jsdelivr.net to style-src for Monaco editor CDN CSS
- Replace static Tone.js import with lazy dynamic import to prevent eager AudioContext creation at module load time
Add missing https://static.cloudflareinsights.com and https://cdn.jsdelivr.net to script-src, and https://cloudflareinsights.com to connect-src in netlify.toml CSP to match the header-based policy.
Use pre-loaded _Tone directly instead of async getTone(), since _buildInstruments guarantees Tone is loaded before playback callbacks fire.
Move getTone() and _Tone cache into masterChain.js with named exports so both modules resolve the same Tone instance. Update soundManager.test.js mock to provide getTone and _Tone.
enable() no longer sets isEnabled=true before ensureInstrumentsAsync() completes. On failure, initPromise and instruments are reset so retries work cleanly instead of being permanently blocked by a cached rejection.
Use a shared mutable object that getTone() populates via Object.assign from the global Tone mock, so _Tone and getTone() return the same instance — matching the real masterChain.js contract.
…gress bar

- Add 'wasm-unsafe-eval' to script-src CSP in public/_headers & netlify.toml
- Split timeouts: 60s for Pyodide init, 10s for code execution
- Worker sends heartbeat during loadPyodide() to prevent false timeouts
- Replace loading spinner with indeterminate motion progress bar
- Run button shows 'Loading Python...' vs 'Running...' distinctly
- Clear stale timeouts on re-run (fixes double-click bug)
fix: resolve CSP violations blocking Tone.js, Monaco, and Umami; defer AudioContext creation
Only the  job runs on  events (no lint/tests/build).
The  job skips closed PRs entirely.
feat: auto-cleanup Cloudflare preview alias on PR close
- Create .well-known/ agent-discovery files (MCP, A2A, Agent Skills, API catalog)
- Add auth.md for agent authentication documentation
- Add Link header pointing to sitemap.xml in _headers
- Register WebMCP tool via navigator.modelContext.registerTool()
- Enable 8 of 9 isitagentready.com checks to pass
- Make execute() accept category arg and filter catalog data accordingly
- Remove phantom tool entries from agent-skills manifest
- Add Content-Type: application/json override for api-catalog in _headers
- Sync MCP manifest tool list with sole bayan_flow_info tool
feat: add agent readiness discovery files and WebMCP support
fix: export video CSP preview, code panel UX, and output dock visibility
- Remove inert Tailwind utilities activated by @config (hover:bg-surface-elevated in Footer)
- Remove fixed gradient overlay (from-bg via-bg to-surface-elevated) from LandingPage, LegalDocument, and ProComingSoonPage — this was transparent on main but renders a lighter-to-dark gradient in dark mode, causing a 'backlight' effect
- Remove RoadmapCTA decorative elements (gradient overlay, glow orb, badge pill) that rendered unintentionally due to @config activating previously dead utilities
- Make Header non-sticky (always relative, never sm:fixed)
- Show 'Sign in with Google' text on non-/app pages; icon-only on /app
- Update tests to match removed elements
Security:
- Restrict deploy-supabase-functions workflow to base repository only (#1)
- Fail-closed on missing IP metadata in before-signup hook (#11)
- Switch waitlist email from localStorage to sessionStorage (#9)
- Remove last_active_at from direct client UPDATE grant; use security definer RPC (#15)

Functional correctness:
- Clear profileRow on implicit sign-out in AuthProvider (#3)
- Prevent email useEffect from clobbering user input on ProComingSoonPage (#5)
- Add autoFocus to delete modal for immediate Escape dismissal (#6)
- Fix Link rendering outside Router context in ProWaitlistBanner (#2)
- Move skip-to-content link above ProWaitlistBanner for a11y (#18)

Stability & hardening:
- Add timeout to supabase.functions.invoke in accessService (#8)
- Add AbortSignal.timeout to Telegram fetch call (#10)
- Reorder delete-account to deleteUser before cleanup for atomicity (#12)
- Add error handling for all Supabase calls in post-signup (#13)
- Add idempotency guard (welcomed_at) to waitlist-welcome (#14)

Code quality:
- Rename proSort0-5 to kebab-case pro-sort-0-5 with stylelint suppression (#4)
- Restore expect import in cspHeaders.test (#7)
- Revert destructive column drop in migration (#17)
- Add new migration for welcomed_at column (#14)

Tests:
- Add test for implicit sign-out profile clearing (AuthProvider)
- Add test for email input not clobbered by async auth (ProComingSoonPage)
- Add test for Escape dismissing delete modal (ProfileSettingsPage)
- Add test for anchor rendering outside Router (ProWaitlistBanner)
npm retired the /-/npm/v1/security/audits endpoint, causing
pnpm audit to fail with 410 on every CI run. Use the built-in
--ignore-registry-errors flag so the audit still runs when the
registry is available but doesn't block CI when it's down.
The <main> element had sm:pt-20 (80px) while the header is only 56px
(h-14) and in normal document flow. This created 24px of dead space
between the header and content. Removed pt-0 sm:pt-20 since p-6
provides sufficient spacing.
Hide GitHub repo badge, language switcher, and theme toggle on pages
other than /app. These controls are auto-detected (browser language,
system theme) and can be changed from the visualizer. The sign-in
button remains visible everywhere; the user avatar is hidden when
authenticated on non-/app pages to reduce distraction.

- Header: gate GitHubRepoBadge, LanguageSwitcher, ThemeToggle behind isAppPage
- UserMenu: accept hideAvatar prop, return null when authenticated on non-/app
- Extract isAppPage from location.pathname for cleaner conditionals
The insight panel backdrop used fixed inset-0 with no top offset,
covering the entire viewport including the header. On desktop, offset
the backdrop by 56px (header height) to match the PythonCodePanel
behavior. Mobile remains full-viewport since the panel sheets up from
the bottom.

- Add isMobile state with resize listener (matching PythonCodePanel)
- Apply style={{ top: '56px' }} to backdrop on desktop
The flag made pnpm audit exit 0 on registry non-200 responses, so the
audit gate could pass without scanning any advisories. Remove it so
registry failures are visible and the gate actually enforces audit
results.
pnpm audit is broken on pnpm 10.x because npm retired the legacy
audit endpoints (410 Gone). Switch to npm audit which uses the new
bulk advisory endpoint. Generates a temporary package-lock.json,
runs the audit, then cleans up.

Add comment explaining the workaround for future maintainers.
pnpm audit is broken on pnpm 10.x — npm retired the legacy audit
endpoints (410 Gone). Replace the fragile npm audit workaround with
OSV-Scanner, a standalone vulnerability scanner that reads
pnpm-lock.yaml natively and aggregates 30+ advisory sources.

- Remove npm audit workaround from ci.yml quality job
- Add .github/workflows/osv-scanner.yml with two jobs:
  - scan-pr: incremental PR scan (blocks on new vulns)
  - scan-scheduled: full scan on push/schedule (advisory only)
- Pin reusable workflows to SHA 9a49870 (v2.3.8, verified)
- Add osv-scanner.toml with empty ignore list for future triage
The reusable workflows require actions:read, contents:read, and
security-events:write but the caller didn't grant them, causing a
startup failure on the first run.
The scan completes successfully but the JSON export exceeds GitHub's
1MB job output limit. Disable export-results since SARIF upload to
Code Scanning is the primary integration, not job outputs.
The PR reusable workflow at this SHA doesn't expose export-results.
The default is already false, so no input is needed.
At v2.3.8 SHA (9a49870), the PR reusable workflow lacks the
export-results input — the export step runs unconditionally and
dumps full scan JSON into job outputs, exceeding GitHub's 1MB limit.

Track @main which has export-results support, and explicitly disable
it. Pin to a specific SHA once a release ships with this input.
feat: platform security foundation, Pro waitlist, and UX improvements
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c1657a10-7f04-414a-98e2-3a5c5b908296

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added documentation Improvements or additions to documentation style Improve styling, design, and animation ci Workflows dependencies config tests labels Jul 16, 2026
@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm css-tree is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/css-tree@3.2.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/css-tree@3.2.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm data-urls is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/data-urls@7.0.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/data-urls@7.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm jsdom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/jsdom@29.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/jsdom@29.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@ayoub3bidi ayoub3bidi changed the title Release: v0.5.0 develop → main (interim sync) chore: sync develop to main Jul 16, 2026
@ayoub3bidi
ayoub3bidi merged commit 686f877 into main Jul 16, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows config dependencies documentation Improvements or additions to documentation style Improve styling, design, and animation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant