Skip to content

feat: improve chat, dashboard, landing page, settings, and account completion#57

Open
0x3EF8 wants to merge 7 commits intohallofcodes:masterfrom
0x3EF8:master
Open

feat: improve chat, dashboard, landing page, settings, and account completion#57
0x3EF8 wants to merge 7 commits intohallofcodes:masterfrom
0x3EF8:master

Conversation

@0x3EF8
Copy link
Copy Markdown
Member

@0x3EF8 0x3EF8 commented Mar 26, 2026

Summary

  • improve chat behavior, realtime flow, and online status accuracy
  • improve dashboard cards/widgets and settings pages
  • improve landing page sections and CTA components
  • improve account-related flows (login, signup, profile, reset password, WakaTime)
  • include Supabase migration updates for chat/dashboard data

Note

  • yes, I probably added more bugs too, so please review and test deeply.

Copilot AI review requested due to automatic review settings March 29, 2026 10:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the chat experience with improved conversation ordering and richer UI (badges/media viewing), and adds database-level cascade deletes to support safe conversation deletion.

Changes:

  • Add DM sorting controls (newest/oldest/A–Z/Z–A), message search, and revamped chat layout with left/right sidebars.
  • Restore/standardize rank badge styling/animations by moving badge CSS into app/globals.css and using class-based badges + icons.
  • Add a Supabase migration to enforce ON DELETE CASCADE for messages and conversation_participants when deleting a conversation.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
supabase/migrations/20260327100000_cascade_conversation_delete.sql Adds cascade FK constraints for conversation cleanup on delete.
package.json Bumps @fortawesome/react-fontawesome to support updated icon usage.
package-lock.json Updates lockfile to reflect dependency bump and npm resolution changes.
app/globals.css Centralizes badge keyframes/styles so they’re shared across UI.
app/components/dashboard/Navbar.tsx Changes default sidebar collapse behavior (desktop now collapsed).
app/components/chat/Player.tsx Adds hint-hiding helper (currently introduces a duplicate declaration).
app/components/chat/Messages.tsx Adds media navigation controls + updated badge rendering with icons.
app/components/chat/Conversations.tsx Updates conversation list item layout/labels/initials.
app/components/LeaderboardTable.tsx Removes inline injected badge CSS now that globals provide styles.
app/components/Chat.tsx Major chat UI refactor: sorting/search, sidebars, media viewer, deletion flow, badge icon mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +83 to +88
const hideHint = () => {
if (hintTimeoutRef.current) window.clearTimeout(hintTimeoutRef.current);
setActiveHint(null);
setHintPos(null);
};

Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

hideHint is declared twice in this component (there is another const hideHint = ... later in the file). This will cause a TypeScript compile error due to redeclaration. Remove one of the declarations and keep a single hideHint implementation.

Suggested change
const hideHint = () => {
if (hintTimeoutRef.current) window.clearTimeout(hintTimeoutRef.current);
setActiveHint(null);
setHintPos(null);
};

Copilot uses AI. Check for mistakes.
@@ -1,23 +1,49 @@
"use client";
"use client";
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

There is a leading BOM/zero-width character before the "use client" directive. Next.js requires the directive to be the very first bytes in the file; the BOM can prevent the component from being treated as a client component. Remove the BOM so the file starts exactly with "use client";.

Suggested change
"use client";
"use client";

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
import { User } from "@supabase/supabase-js";
import { User } from "@supabase/supabase-js";
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This file starts with a BOM/zero-width character before the first import. While it may not break runtime behavior, it commonly causes noisy diffs and occasional tooling issues. Please remove the BOM so the file begins with a normal import ....

Suggested change
import { User } from "@supabase/supabase-js";
import { User } from "@supabase/supabase-js";

Copilot uses AI. Check for mistakes.
Comment on lines +199 to 201
// default to collapsed on desktop too
setCollapsed(true);
setMobileHidden(false);
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

This change makes the sidebar default to collapsed on desktop as well as mobile. Since the PR is focused on chat ordering/cascade delete, this looks like an unrelated UX change; if it is intentional, it should be called out in the PR description (or moved to a separate PR) to avoid surprising behavior changes.

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
"use client";
"use client";
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

There is a leading BOM/zero-width character before the "use client" directive. Next.js requires the directive to be the very first bytes in the file; the BOM can prevent the component from being treated as a client component. Remove the BOM so the file starts exactly with "use client";.

Suggested change
"use client";
"use client";

Copilot uses AI. Check for mistakes.
const [showModal, setShowModal] = useState(false);
const [search, setSearch] = useState("");
const [allUsers, setAllUsers] = useState<ChatUser[]>([]);
const [search, setSearch] = useState(""); const [messageSearch, setMessageSearch] = useState(""); const [allUsers, setAllUsers] = useState<ChatUser[]>([]);
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

These state declarations appear to have been accidentally concatenated onto a single line, which hurts readability and makes future diffs harder to review. Please split them into separate const declarations on their own lines.

Suggested change
const [search, setSearch] = useState(""); const [messageSearch, setMessageSearch] = useState(""); const [allUsers, setAllUsers] = useState<ChatUser[]>([]);
const [search, setSearch] = useState("");
const [messageSearch, setMessageSearch] = useState("");
const [allUsers, setAllUsers] = useState<ChatUser[]>([]);

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +16
faEllipsisVertical,
faFlag,
faLock,
faGhost,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

Several icons are imported here but never referenced in the file (e.g. faEllipsisVertical, faFlag, faLock). This will fail linting in many configurations and adds noise. Remove unused imports or wire them up where intended.

Suggested change
faEllipsisVertical,
faFlag,
faLock,
faGhost,

Copilot uses AI. Check for mistakes.
Comment on lines +633 to +638
const allMediaAttachments = messages
.flatMap((m) => m.attachments || [])
.filter(
(a) => a?.mimetype?.startsWith("image/") || a?.mimetype?.startsWith("video/")
)
.reverse();
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

allMediaAttachments is rebuilt (including a .reverse()) on every render. With long message histories this can become a noticeable cost. Consider memoizing this derived list with useMemo (and potentially sharing the media-viewer logic with Messages to avoid duplicated implementations).

Copilot uses AI. Check for mistakes.
@0x3EF8 0x3EF8 changed the title feat(chat): add chat ordering enhancements and cascade delete migration feat: improve chat, dashboard, landing page, settings, and account completion Mar 29, 2026
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