Skip to content

Port full study-spot/group UI from huddle-sandbox#1

Merged
parsa-faraji merged 3 commits into
mainfrom
feat/sandbox-ui-port
Apr 18, 2026
Merged

Port full study-spot/group UI from huddle-sandbox#1
parsa-faraji merged 3 commits into
mainfrom
feat/sandbox-ui-port

Conversation

@parsa-faraji

@parsa-faraji parsa-faraji commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces the auth-only TS scaffold with the sandbox React + Tailwind app: layouts, bottom nav, study-spot discovery/info/session-log, study-group discovery/info/create, insights, cards/modals, mock data
  • Stack swap: TypeScript -> JavaScript, React 18 -> 19, Router 6 -> 7, Vite 5 -> 7, added Tailwind v4 via @tailwindcss/vite
  • Backend/, api/, and Firebase configs preserved so the data layer can be wired to Firestore later

Bugs fixed in the sandbox during the port

  • AppContext: added joinSpot / joinedSpots / addGroup / groups
  • StudyGroupCreate now persists via context; Discovery/Info read from context
  • StudySpotCardL: added missing Join button (onJoin prop was dead)
  • StudySessionLog: stores spotId so Insights can link back
  • Insights: spot links use spotId, added Joined Spots section
  • JoinModal: handles spots gracefully (no meetingTime/members)
  • vercel.json: SPA fallback rewrite
  • .gitignore: excludes serviceAccountKey.json and .vercel

Conflict notice

Remote main has 7 commits not in this branch, including a TS strict-mode refactor that conflicts with this JS port. Reconciliation is intentional in this PR.

Test plan

  • npm install clean
  • npm run dev boots, all 9 routes return 200
  • npm run build clean (64 modules, 274 kB bundle)
  • Manual click-through after merge

Note

Medium Risk
Medium risk due to a broad frontend port (TS→JS, new routing/layout structure) plus major dependency upgrades (React/Router/Vite/Tailwind) that can introduce runtime/build regressions. Backend runtime behavior is mostly unchanged, but deployment wiring for Vercel/Render adds configuration surface area.

Overview
Ports the frontend from a minimal auth-only TypeScript scaffold to the full sandbox app structure, introducing new layouts and route tree for auth, study spots, study groups, and insights, and switching the entrypoint to src/main.jsx.

Modernizes the frontend toolchain by adding Tailwind v4 via @tailwindcss/vite, introducing a new flat eslint.config.js, and upgrading core dependencies (React 19, React Router 7, Vite 7) with corresponding script/lint changes.

Adds backend enablement and team docs: a Vercel serverless wrapper (api/index.js) plus SPA rewrites, a Render deployment manifest, Firebase setup instructions, and an in-repo backend workshop/playground; also updates .gitignore to exclude Firebase service account keys and .vercel state.

Reviewed by Cursor Bugbot for commit ff10b74. Bugbot is set up for automated code reviews on this repo. Configure here.

Replaces the auth-only TS scaffold with the sandbox React + Tailwind app:
layouts (App/Auth) + bottom nav, study spot discovery/info/session-log,
study group discovery/info/create, insights page, cards/modals, and
mock data for spots, groups, and sessions.

Stack swap: TypeScript -> JavaScript, React 18 -> 19, Router 6 -> 7,
Vite 5 -> 7, added Tailwind v4 via @tailwindcss/vite. Old Firebase auth
pages (SignIn/SignUp/Dashboard) removed; sandbox client-side auth pages
take their place. Backend/, api/, and Firebase config are preserved so
the data layer can be wired to Firestore later.

Bug fixes layered on top of the sandbox during the port:
- AppContext gains joinSpot/joinedSpots/addGroup/groups so spot joins
  and newly created groups actually persist in app state
- StudyGroupCreate now writes through addGroup; Discovery/Info read
  from context so created groups appear immediately
- StudySpotCardL exposes a real Join button (onJoin prop was unwired)
- StudySessionLog records spotId so Insights can link back to the spot
- Insights links rated spots by spotId and adds a Joined Spots section
- JoinModal handles spots gracefully (no meetingTime/members)
- vercel.json adds SPA fallback rewrite so deep links don't 404 in prod
- .gitignore excludes serviceAccountKey.json and .vercel
@vercel

vercel Bot commented Apr 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
huddle Ready Ready Preview, Comment Apr 18, 2026 1:23am
huddle-ucb-learning Ready Ready Preview, Comment Apr 18, 2026 1:23am

Reconciles the sandbox UI port with team work that landed on main while
the port was in flight (CI workflow, MIT license, README badges, env
templates, backend security hardening, TS strict-mode + domain types).

Conflict resolutions:
- Backend/firebase.js, Backend/server.js, Backend/.env.example: took
  origin/main to preserve security work (CORS allowlist, body limits,
  security headers, error handler, env validation)
- package.json: combined — kept origin/main's backend:* and start:all
  scripts, dropped 'tsc &&' from build (no .tsx source remains), kept
  the port's React 19 / Tailwind v4 / Router 7 deps
- Auto-merged: .env.example, .github/workflows/ci.yml, LICENSE,
  README.md, firestore.rules, Backend/middleware/verifyToken.js,
  Backend/package.json, src/types/index.ts

Orphaned by the JSX swap (the port replaces them with sandbox-derived
JSX equivalents, so origin/main's TS strict-mode edits to these files
have nothing to apply against):
- src/App.tsx, src/pages/Dashboard.tsx, src/pages/SignIn.tsx,
  src/services/authService.ts, tsconfig.json

src/types/index.ts is preserved — currently unused by the JSX runtime
but kept for future TS work.

Verified: vite build clean (64 modules, 274 kB).
The CI workflow's `npm run typecheck` step was broken by the merge:
- typecheck script was dropped from package.json
- tsconfig.json was deleted alongside the orphaned .tsx files
- src/types/index.ts (preserved from origin/main) imports firebase/auth

Restores a minimal tsconfig.json scoped to src/**/*.ts(x) only — strict
mode kept, no project references (tsconfig.node.json was deleted with
vite.config.ts and isn't needed). Adds typescript devDep and firebase
runtime dep so the type imports resolve.

Verified locally: npm run typecheck and npm run build both pass.
@parsa-faraji parsa-faraji merged commit f276985 into main Apr 18, 2026
5 of 6 checks passed
@parsa-faraji parsa-faraji deleted the feat/sandbox-ui-port branch April 18, 2026 01:22

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ff10b74. Configure here.

Comment thread api/index.js
@@ -0,0 +1,3 @@
const serverless = require('serverless-http');
const app = require('../Backend/server');
module.exports = serverless(app);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Serverless wrapper imports app that isn't exported

High Severity

Backend/server.js never sets module.exports = app, so require('../Backend/server') returns an empty object. serverless({}) wraps nothing, making the Vercel serverless function non-functional. Additionally, the require call executes app.listen(PORT) at load time, which is incorrect in a serverless context where no persistent port binding is desired.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ff10b74. Configure here.

Comment thread Backend/playground.html
<label>Quick presets</label>
<div class="presets">
<button type="button" class="preset" data-method="GET" data-url="/api">Server alive?</button>
<button type="button" class="preset" data-method="GET" data-url="/api/health">Health check</button>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Playground preset paths don't match server routes

Medium Severity

Preset buttons use paths like /api, /api/health, and /api/profile, but Backend/server.js registers routes at /, /health, and /profile (no /api prefix). Every preset request will hit the Express 404 handler regardless of how the playground is opened.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ff10b74. Configure here.

Comment thread index.html
<link href="https://fonts.googleapis.com/css2?family=Marcellus+SC&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Jost:ital,wght@0,100..900;1,100..900&family=Marcellus+SC&display=swap" rel="stylesheet">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicate preconnect links and font stylesheet in HTML

Low Severity

The preconnect links for fonts.googleapis.com and fonts.gstatic.com are declared twice (lines 7–8 and 10–11). The Marcellus SC font is also loaded twice — once standalone on line 9 and again bundled into the larger font request on line 12. Lines 7–9 are entirely redundant and can be removed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ff10b74. Configure here.

Comment thread BACKEND_SLIDES_PASTE.txt
• Keep using the Playground + WORKSHOP.md for pair programming

---
Tip: In Google Slides or PowerPoint, click the text box on each slide and paste or type the bullets above.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Presentation slide notes committed to repository

Low Severity

BACKEND_SLIDES_PASTE.txt contains mid-semester presentation talking points ("PASTE THIS INTO YOUR HUDDLE MID-SEMESTER PRESENTATION"). This appears to be ephemeral team coordination content rather than project documentation, and probably doesn't belong in the repository long-term.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ff10b74. Configure here.

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.

1 participant