Skip to content

feat: 1-Click Live SLCM Sync Agent Bridge & Electric Teal Theme Overhaul - #3

Merged
bleedingedge121 merged 1 commit into
masterfrom
feat/one-click-sync-and-teal-theme
Sep 19, 2026
Merged

bleedingedge121 merged 1 commit into
masterfrom
feat/one-click-sync-and-teal-theme

Conversation

@bleedingedge121

Copy link
Copy Markdown
Owner

Summary of Upgrades

🔄 1. Seamless 1-Click Live SLCM Attendance Sync (No manual file picking!)

  • Local Scraper Agent Bridge (scraper/agent.js): Lightweight Node HTTP server on http://localhost:4747 with CORS support for http://localhost:3000.
    • GET /status: Validates session existence.
    • POST /sync: Executes Playwright session interception directly, auto-prompting browser SSO/MFA if needed, and returns JSON payload directly in HTTP response body.
    • Modularized scraper/login.js and scraper/sync.js so they function seamlessly both as imported modules and standalone CLI scripts.
  • UI Integration:
    • SettingsView.tsx: High-visibility "Sync Now (1-Click)" button. If the local daemon is not running, displays an instant copy-command card (cd scraper && node agent.js) and retry button.
    • OnboardingWizard.tsx: Actionable "Synchronize Live SLCM Attendance?" step right after section timetable import.
    • Preserved smaller secondary fallback link for manual JSON uploads.

🎨 2. Electric Teal/Cyan Primary Accent Overhaul

  • Light Mode: High-contrast #0D9488 (teal-600) on warm cream paper (#FFFDF5).
  • Dark Mode: Luminous #2DD4BF (teal-400) on warm charcoal (#15131A).
  • Secondary pink (#F472B6), tertiary amber (#FBBF24), and mint (#34D399) remain as rotating geometric accents.
  • Replaced hardcoded violet color classes across all components (Navigation, HomeView, SubjectsView, CalendarView, SettingsView, ChatWidget, CourseModal, SlotModal, SyncModal, SectionImportModal, login/page.tsx) with semantic theme tokens.

⚡ 3. Performance & Bundle Optimizations

  • Client Dynamic Import: ChatWidget lazy-loaded via next/dynamic with ssr: false, reducing main thread hydration footprint.
  • Self-Hosted Fonts: next/font/google for zero-render-blocking font preloading.
  • Parallel Query Execution: Concurrent Promise.all batching for all database queries.
  • First Load JS: Verified clean 87.6 kB shared baseline across 18 routes with 0 TypeScript/ESLint errors.

📚 4. Comprehensive Documentation

  • Updated README.md and docs/ARCHITECTURE.md detailing agent daemon lifecycle, API routes, and setup instructions.

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Address the agent security/concurrency issues and fix the ineffective automatic onboarding sync.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds a local 1-click SLCM synchronization agent, onboarding/settings integration, electric teal theming, lazy chat loading, and updated documentation.

Changes:

  • Added modular Playwright login/sync flows and local HTTP agent.
  • Integrated synchronization into onboarding and Settings.
  • Replaced violet styling with teal theme tokens.
  • Updated performance configuration, scripts, and documentation.
File Summary
src/​components/​SyncModal.tsx Teal theme updates
src/​components/​SubjectsView.tsx Teal theme updates
src/​components/​SlotModal.tsx Teal theme and import cleanup
src/​components/​SettingsView.tsx One-click sync UI and fallback upload
src/​components/​SectionImportModal.tsx Teal theme updates
src/​components/​OnboardingWizard.tsx SLCM onboarding sync flow; automatic matching requires correction
src/​components/​Navigation.tsx Teal navigation styling
src/​components/​HomeView.tsx Teal styling
src/​components/​CourseModal.tsx Teal styling and defaults
src/​components/​ChatWidget.tsx Teal chatbot styling
src/​components/​CalendarView.tsx Teal styling and chart colors
src/​app/​page.tsx Lazy-loaded chatbot
src/​app/​login/​page.tsx Teal login styling
src/​app/​layout.tsx Teal selection styling
src/​app/​globals.css Updated theme tokens
scraper/​sync.js Modular scraper implementation
scraper/​login.js Modular login implementation
scraper/​agent.js Local HTTP bridge; restrict origins and serialize requests
README.md Sync setup documentation
package.json Scraper agent script
docs/​ARCHITECTURE.md Agent architecture documentation

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scraper/agent.js
Comment on lines +11 to +15
function setCorsHeaders(res) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
}
Comment on lines +127 to +134
apply: true,
merges: json.courses.map((c: any) => ({
incomingCode: c.code,
incomingName: c.name,
present: c.present,
absent: c.absent,
targetCourseId: 'AUTO_MATCH',
})),
@bleedingedge121
bleedingedge121 merged commit dfb4f4a into master Sep 19, 2026
1 check passed
@bleedingedge121
bleedingedge121 deleted the feat/one-click-sync-and-teal-theme branch September 19, 2026 08:47
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