moved dashboard to react + vite#132
Open
mcap114 wants to merge 10 commits into
Open
Conversation
commit 9ffaf54 Author: Myles Ramirez <myles_ramirez@dlsu.edu.ph> Date: Tue Jun 23 22:03:10 2026 +0800 Add revision plan features: expert system, profiles, notifications, discussion page, recording UI Implements supervisor feedback from consultation revision plan: - Redesign citation cards: source, votes, delete/report in bottom action bar - Fix role-based access: normalized ownership check, Reply for others' citations, Delete only for own - Top 3 ranked responses per group (expert > upvotes > recency) with "See all" link - Minimized extension state with live citation/request counters - Auto-fill start timestamp from video playback, side-by-side fields, Start/Stop recording buttons - Red pulsing outline + elapsed-time badge on video player during recording - Expert application & verification system (apply per category, admin approve/reject) - User profile page with stats, bio, activity history - Expert notification system (auto-notify on matching category, mute support) - Forum/discussion page with full threads, sorting, expert badges - Citation reply system with parentCitationId grouping New models: Expert, ExpertApplication, UserProfile, Notification New routes: /api/profile, /api/notifications, /api/discussion New page: discussion/discussion.html
commit cbc36f3 Author: Myles Ramirez <myles_ramirez@dlsu.edu.ph> Date: Fri Jun 26 09:45:51 2026 +0800 Add design system, unified panel layout, recording UI, and performance fixes Design System: - Create shared tokens.css with 80+ CSS variables (colors, typography, spacing, radii, shadows) - Rewrite extension.css eliminating duplicate rules and inconsistent colors - Rewrite dashboard.css and discussion.css with @import tokens.css - Unify popup.html to use design tokens instead of inline Segoe UI styles - Standardize category badge colors across citations.js and dashboard.js Panel Architecture: - Merge dual-header (full/minimized) into single always-visible accordion header - Tab buttons serve as both counters (minimized) and navigation (expanded) - Remove redundant section title, move dashboard button inline with actions - Tighten spacing, cards, and action bar for better information density Recording System: - Redesign player record button (larger, red glow background, circular SVG icons) - Redesign segments panel from side-dock to centered modal with proper cards - Auto-expand extension when clicking Citation/Request from segment - Remove panel recording indicator (overlay is sufficient), show REC instead of elapsed time - Restyle form recording buttons as outlined instead of solid red Bug Fixes: - Fix manifest v3 warning (remove leftover background.scripts field) - Add context invalidation guards to prevent errors after extension reload - Remove menu-click username detection that opened YouTube profile on reload - Replace with passive DOM observation (MutationObserver + Polymer __data) Performance: - Add fast limit:1 count fetches for both tabs on init - Prevent counter reset to loading dots when real count already loaded - Poll inactive tab counts to keep both counters current commit 9ffaf54 Author: Myles Ramirez <myles_ramirez@dlsu.edu.ph> Date: Tue Jun 23 22:03:10 2026 +0800 Add revision plan features: expert system, profiles, notifications, discussion page, recording UI Implements supervisor feedback from consultation revision plan: - Redesign citation cards: source, votes, delete/report in bottom action bar - Fix role-based access: normalized ownership check, Reply for others' citations, Delete only for own - Top 3 ranked responses per group (expert > upvotes > recency) with "See all" link - Minimized extension state with live citation/request counters - Auto-fill start timestamp from video playback, side-by-side fields, Start/Stop recording buttons - Red pulsing outline + elapsed-time badge on video player during recording - Expert application & verification system (apply per category, admin approve/reject) - User profile page with stats, bio, activity history - Expert notification system (auto-notify on matching category, mute support) - Forum/discussion page with full threads, sorting, expert badges - Citation reply system with parentCitationId grouping New models: Expert, ExpertApplication, UserProfile, Notification New routes: /api/profile, /api/notifications, /api/discussion New page: discussion/discussion.html
Brings all 12 security/bug fixes from the audit remediation branch into
the dashboard rework, while keeping the dashboard branch's own work
(React/Vite scaffold references removed since unbuilt, topics taxonomy,
feeds, tabs, video scraping).
Key reconciliation decisions:
- Backend routes/models: kept the dashboard branch's CATEGORY vs TOPIC
taxonomy split (constants.js), re-applied every security fix onto the
correct field names (Expert.topics not .categories, UserProfile.
followedTopics not .followedCategories, etc.)
- backend/routes/discussion.js, content/citations.js, discussion/
discussion.js: dev's versions were strict supersets (nested threading,
vote-button-disable guard, the showToast dedup fix) - kept wholesale
- backend/routes/experts.js, content/api.js: deduplicated an accidental
double function/message-handler declaration that would have silently
broken the topics-based expert-apply flow
- dashboard.html/dashboard.js: the React dashboard scaffold has no build
output (dist/ doesn't exist, vite build was never run) - kept the
working vanilla JS dashboard and added the tab/feed/topic-checkbox
markup it needs, since dashboard.js already had the fuller feature set
- Fixed two bugs uncovered while reconciling (both pre-existing on the
dashboard branch, not introduced by this merge):
- backend/routes/{citations,requests}.js referenced an unimported
`CATEGORIES` instead of `ALL_CATEGORIES` on the category-change
endpoint (would throw ReferenceError on every request)
- backend/lib/notifyExperts.js queried Expert.categories/profile.
mutedCategories, fields that no longer exist post-topics-rework
- backend/models/Video.js had the same redundant-index pattern as
Fix 11 (unique:true + index:true + a duplicate .index() call)
- General feed topic filter was populated with CATEGORIES values but
backend/routes/feeds.js filters by video TOPICS - fixed the dropdown
and wiring to use the taxonomy the backend actually queries on
All test fixtures updated to match: config/experts.js now reads
EXPERT_CONFIG (not EXPERT_USERNAMES), expert applications use a topics
array (not a single category).
Verified: full backend suite (108/108 tests) passing against the merged
state, zero Mongoose warnings, all touched JS syntax-checked.
Firefox's WebExtensions implementation doesn't have MV3 service workers enabled and requires the background.scripts array as a fallback - Chrome uses service_worker and ignores scripts, Firefox does the reverse. Without this, the Selenium/Firefox CI job fails outright at addon install: "Could not install Add-on: background.service_worker is currently disabled. Add background.scripts." Fixes the failing "test" check on PR #132.
- e2e/extension.spec.js, selenium/firefox.test.js: replace assertions on a removed #citation-title heading (dropped in the accordion header rework) with container-visibility checks on the actual current markup. - Add e2e/browserChannel.js and wire it into every spec + helpers.js: opt-in PW_BROWSER_CHANNEL env var routes Playwright through system Edge to work around a Windows-only corrupted Chromium install; no-op in CI. - All E2E entry points now expand the panel before interacting with it, since it starts minimized by default and tests were never updated for that change. - styles/extension.css: .cp-loading/.cp-skeleton were referenced by content/citations.js's loading state but had no CSS anywhere, so the skeleton rendered as an invisible zero-height block on every list load. Added real skeleton styles.
Completes miguel's in-progress React/Vite dashboard to feature parity with the vanilla-JS dashboard it replaces: - Add Analytics, ExpertFeed, Notifications, and Profile components (stats, bio form, activity history, expert application flow, and an admin review panel that silently hides itself on a 403 for non-admins, mirroring the old dashboard.js behavior). - Fix UserContext.jsx reading expertData.expertTopics instead of the actual expertData.topics field returned by the API. - Wire all view components into MainContent.jsx's tab switch (it was only rendering placeholder headings) and Notifications into SidebarRight.jsx, replacing a static "Trending Topics" placeholder that never had a backing API. - Point dashboard/dashboard.html at the built React bundle (#react-dashboard-root + dist/dashboard.bundle.js) instead of the vanilla dashboard.js, and list the bundle files in manifest.json's web_accessible_resources. Verified end-to-end against the live backend in a loaded extension instance: General Feed, Analytics, and Profile all render real data, and the Notifications sidebar widget works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.