Skip to content

Metadata UI refactor#1550

Merged
yujonglee merged 16 commits intomainfrom
metadata-ui-refactor
Oct 10, 2025
Merged

Metadata UI refactor#1550
yujonglee merged 16 commits intomainfrom
metadata-ui-refactor

Conversation

@duckduckhero
Copy link
Contributor

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Propagates sessionId into the session header callsite and replaces a single monolithic OuterHeader with composed subcomponents (FolderChain, SessionEvent, SessionParticipants, Recording/Listen/Share/Others). Adds EventChip and ParticipantsChip UI primitives, a generic useQuery hook, and renames event→session participant mapping across DB, TinyBase persisted schema, and seed data.

Changes

Cohort / File(s) Summary
Session header callsite
apps/desktop2/src/components/main/body/sessions/index.tsx
Passes sessionId into OuterHeader render call (prop augmentation only).
OuterHeader removed + new aggregator
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (removed), apps/desktop2/src/components/main/body/sessions/outer-header/index.tsx
Deleted old monolithic OuterHeader; added new OuterHeader({ sessionRow, sessionId }) that composes subcomponents.
OuterHeader subcomponents & types
apps/desktop2/src/components/main/body/sessions/outer-header/* (event.tsx, folder.tsx, participant.tsx, recording.tsx, listen.tsx, share.tsx, other.tsx, types.ts, index.tsx)
New components: SessionEvent, FolderChain/FolderItem, SessionParticipants, presentational Recording/Listen/Share/Others buttons, and SessionRowProp type. SessionEvent/SessionParticipants use useQuery and TinyBase.
New UI primitive: EventChip
packages/ui/src/components/block/event-chip.tsx
Adds EventChip with Event/EventChipProps, popover UI (EventDetails, EventSearch, DatePicker), handlers (select, detach, join, view, change date), and utilities.
New UI primitive: ParticipantsChip
packages/ui/src/components/block/participants-chip.tsx
Adds ParticipantsChip, Participant/ParticipantGroup types, grouped list, add/search input, and mutation callbacks (add/select/remove).
Generic async hook
apps/desktop2/src/hooks/useQuery.ts
New generic useQuery<T, TDeps> hook supporting optional deps and enabled flag; returns { data, error }.
TinyBase persisted schema rename
apps/desktop2/src/store/tinybase/persisted.ts
Renamed mapping schema/type and related exports: mapping_event_participantmapping_session_participant, event_idsession_id, and related relationship names updated to reference sessions.
Seed data rename & generator
apps/desktop2/src/store/seed.ts
Replaced MappingEventParticipant usages with mappingSessionParticipant, renamed helper to createmappingSessionParticipant, renamed mapping key, and added totalParticipantMappings stat/log.
DB schema rename
packages/db/src/schema.ts
Renamed DB symbols/table from event→session mapping, replaced event_id FK with session_id referencing sessions.id.
Sidebar styling tweak
apps/desktop2/src/components/main/sidebar/index.tsx
Adjusted header/panel spacing and rounded styling; no logic changes.
Platform minor change
plugins/windows/src/window/v1.rs
macOS traffic light position adjusted from (12.0,20.0) → (18.0,24.0).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant T as TabContentNote
  participant OH as OuterHeader
  participant EV as SessionEvent (EventChip)
  participant PC as SessionParticipants (ParticipantsChip)
  participant Q as useQuery
  participant S as TinyBase Store

  U->>T: open session tab
  T->>OH: render(sessionRow, sessionId)
  OH->>S: read session cells (event_id, created_at, mapping_session_participant)
  OH->>EV: render with derived event + callbacks
  OH->>PC: render with participant groups + callbacks

  alt search events
    U->>EV: set search query
    EV->>Q: fetch/filter events (enabled)
    Q-->>EV: results
  end

  alt select event
    U->>EV: select event
    EV->>S: setCell(sessionId, "event_id", event.id)
    EV->>S: setCell(sessionId, "created_at", event.start_date)
    EV-->>U: close popover
  end

  alt add participant
    U->>PC: select/add participant
    PC->>S: create mapping_session_participant linking sessionId & humanId
    PC-->>U: update UI
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • v1: New headers + React19 #1540 — Directly related: overlapping OuterHeader refactor and the new outer-header/* components (same code-level area).
  • Search people fix #1195 — Related: changes to session-participant mapping and schema that overlap DB/TinyBase/seed edits.
  • Refactor main area #1548 — Related: modifies sessions UI and header usage, including the propagated sessionId and TabContentNote integration.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning There is no pull request description provided, so there is no information explaining the intent, scope, or details of the changeset, which makes this check fail. Please add a concise description summarizing the purpose of this refactor, the main changes introduced, and any important impacts or migration steps to help reviewers understand and evaluate the PR.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Metadata UI refactor” does reference the broad UI restructuring present in this changeset, but it is overly generic and does not clearly convey the specific components or functionality that were updated, such as the session header, event chip, and participant chip. Because it does at least partially relate to the actual UI refactor, this check passes under the lenient criteria.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0efbfb4 and 9d2a929.

📒 Files selected for processing (2)
  • packages/ui/src/components/block/event-chip.tsx (1 hunks)
  • packages/ui/src/components/block/participants-chip.tsx (1 hunks)

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ecade23 and 564f566.

📒 Files selected for processing (4)
  • apps/desktop2/src/components/main/body/sessions/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx (2 hunks)
  • packages/ui/src/components/block/event-chip.tsx (1 hunks)
  • packages/ui/src/components/block/participants-chip.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • packages/ui/src/components/block/event-chip.tsx
  • apps/desktop2/src/components/main/body/sessions/index.tsx
  • packages/ui/src/components/block/participants-chip.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx
🧬 Code graph analysis (4)
packages/ui/src/components/block/event-chip.tsx (2)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/button.tsx (1)
  • Button (37-89)
apps/desktop2/src/components/main/body/sessions/index.tsx (1)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)
  • OuterHeader (8-180)
packages/ui/src/components/block/participants-chip.tsx (4)
packages/ui/src/components/ui/popover.tsx (3)
  • Popover (85-85)
  • PopoverTrigger (85-85)
  • PopoverContent (85-85)
packages/utils/src/string.ts (1)
  • getInitials (1-12)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/avatar.tsx (2)
  • Avatar (58-58)
  • AvatarFallback (58-58)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (2)
packages/ui/src/components/block/event-chip.tsx (2)
  • Event (42-50)
  • EventChip (69-180)
packages/ui/src/components/block/participants-chip.tsx (2)
  • Participant (6-16)
  • ParticipantsChip (38-123)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci (windows, windows-latest)
🔇 Additional comments (1)
apps/desktop2/src/components/main/body/sessions/index.tsx (1)

54-54: Looks good.

Passing sessionId keeps the header in sync with the new API.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 648c185 and eeb83ec.

📒 Files selected for processing (4)
  • apps/desktop2/src/components/main/body/sessions/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx (2 hunks)
  • packages/ui/src/components/block/event-chip.tsx (1 hunks)
  • packages/ui/src/components/block/participants-chip.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • apps/desktop2/src/components/main/body/sessions/index.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx
  • packages/ui/src/components/block/participants-chip.tsx
  • packages/ui/src/components/block/event-chip.tsx
🧬 Code graph analysis (4)
apps/desktop2/src/components/main/body/sessions/index.tsx (1)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)
  • OuterHeader (8-180)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (2)
packages/ui/src/components/block/event-chip.tsx (2)
  • Event (42-50)
  • EventChip (69-180)
packages/ui/src/components/block/participants-chip.tsx (2)
  • Participant (6-16)
  • ParticipantsChip (38-123)
packages/ui/src/components/block/participants-chip.tsx (4)
packages/ui/src/components/ui/popover.tsx (3)
  • Popover (85-85)
  • PopoverTrigger (85-85)
  • PopoverContent (85-85)
packages/utils/src/string.ts (1)
  • getInitials (1-12)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/avatar.tsx (2)
  • Avatar (58-58)
  • AvatarFallback (58-58)
packages/ui/src/components/block/event-chip.tsx (2)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/button.tsx (1)
  • Button (37-89)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci (windows, windows-latest)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)

15-158: Make ParticipantsChip search controllable (and clear unused state).

ParticipantsChip is rendered with searchQuery="", so the input can never change. Users can’t type, and the unused participantSearchQuery/participantSearchResults state breaks our lint gate. Wire the chip to the local query state (and drop the unused results state for now).

-import { Participant, ParticipantsChip } from "@hypr/ui/components/block/participants-chip";
+import { ParticipantsChip } from "@hypr/ui/components/block/participants-chip";
@@
-  const [participantSearchQuery, setParticipantSearchQuery] = useState("");
-  const [participantSearchResults, setParticipantSearchResults] = useState<Participant[]>([]);
+  const [participantSearchQuery, setParticipantSearchQuery] = useState("");
@@
-          searchQuery=""
-          onSearchChange={(query) => {
-            console.log("Search query:", query);
-          }}
-          searchResults={[]}
+          searchQuery={participantSearchQuery}
+          onSearchChange={setParticipantSearchQuery}
+          searchResults={[]}
♻️ Duplicate comments (1)
packages/ui/src/components/block/event-chip.tsx (1)

15-33: Fix formatDate token replacement to prevent malformed dates.

Sequential replace calls let shorter tokens (e.g., "d") fire inside longer ones ("dd", "EEE"), producing invalid strings like "2025-10-1515" for "yyyy-MM-dd". That breaks the <input type="date"> binding and any tooltip using the formatter. Swap to a single regex that matches the known tokens once, longest-first.

-  let result = format;
-  Object.entries(replacements).forEach(([key, value]) => {
-    result = result.replace(new RegExp(key, "g"), value);
-  });
-
-  return result;
+  const tokenPattern = new RegExp(
+    Object.keys(replacements)
+      .sort((a, b) => b.length - a.length)
+      .join("|"),
+    "g",
+  );
+
+  return format.replace(tokenPattern, (token) => replacements[token]);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eeb83ec and 88c4f1d.

📒 Files selected for processing (6)
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx (2 hunks)
  • apps/desktop2/src/hooks/useQuery.ts (1 hunks)
  • apps/desktop2/src/store/seed.ts (7 hunks)
  • apps/desktop2/src/store/tinybase/persisted.ts (5 hunks)
  • packages/db/src/schema.ts (2 hunks)
  • packages/ui/src/components/block/event-chip.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • packages/ui/src/components/block/event-chip.tsx
  • apps/desktop2/src/store/seed.ts
  • packages/db/src/schema.ts
  • apps/desktop2/src/store/tinybase/persisted.ts
  • apps/desktop2/src/hooks/useQuery.ts
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx
🧬 Code graph analysis (5)
packages/ui/src/components/block/event-chip.tsx (2)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/button.tsx (1)
  • Button (37-89)
apps/desktop2/src/store/seed.ts (2)
apps/desktop2/src/store/tinybase/persisted.ts (1)
  • mappingSessionParticipant (117-117)
packages/db/src/schema.ts (1)
  • mappingSessionParticipant (63-67)
packages/db/src/schema.ts (1)
apps/desktop2/src/store/tinybase/persisted.ts (2)
  • mappingSessionParticipant (117-117)
  • mappingSessionParticipantSchema (70-72)
apps/desktop2/src/store/tinybase/persisted.ts (2)
packages/db/src/schema.ts (2)
  • mappingSessionParticipantSchema (142-142)
  • mappingSessionParticipant (63-67)
apps/desktop2/src/store/tinybase/shared.ts (1)
  • InferTinyBaseSchema (30-33)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (3)
packages/ui/src/components/block/participants-chip.tsx (2)
  • Participant (6-16)
  • ParticipantsChip (38-123)
packages/ui/src/components/block/event-chip.tsx (2)
  • Event (42-50)
  • EventChip (68-177)
apps/desktop2/src/hooks/useQuery.ts (1)
  • useQuery (3-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci (windows, windows-latest)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
apps/desktop2/src/store/tinybase/persisted.ts (1)

117-117: Restore PascalCase type alias for public API stability.

The exported alias dropped to lowerCamelCase, breaking consumers expecting MappingSessionParticipant. Please revert to PascalCase.

-export type mappingSessionParticipant = z.infer<typeof mappingSessionParticipantSchema>;
+export type MappingSessionParticipant = z.infer<typeof mappingSessionParticipantSchema>;
🧹 Nitpick comments (5)
apps/desktop2/src/components/main/body/sessions/outer-header/listen.tsx (1)

3-9: Unused sessionRow parameter and missing functionality.

The sessionRow parameter is unused (indicated by the _ prefix). The button is currently static with no click handler or functionality.

Consider either:

  • Removing the sessionRow parameter if it won't be needed, or
  • Adding a TODO comment explaining the planned functionality, or
  • Implementing the intended "Start listening" behavior
apps/desktop2/src/components/main/body/sessions/outer-header/share.tsx (1)

3-9: Unused sessionRow parameter and missing functionality.

The sessionRow parameter is unused (indicated by the _ prefix). The button lacks a click handler and has no sharing functionality implemented.

Consider implementing the sharing behavior or adding a TODO comment to document the planned functionality.

apps/desktop2/src/components/main/body/sessions/outer-header/recording.tsx (1)

3-9: Hardcoded recording time and unused sessionRow parameter.

The recording duration "02:27" is hardcoded and the sessionRow parameter is unused. This likely should display actual recording data from the session.

Consider:

  • Implementing logic to derive recording duration from sessionRow
  • Adding a click handler for playback/recording control
  • Or adding a TODO comment documenting the planned implementation
apps/desktop2/src/components/main/body/sessions/outer-header/other.tsx (1)

3-9: Missing menu functionality.

The sessionRow parameter is unused, and there's no click handler or dropdown menu implementation for the ellipsis button.

Consider implementing the context menu or documenting the planned actions for this button.

apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx (1)

148-158: Inefficient "No organization" lookup.

The code iterates through all organizations on every add operation to find "No organization". This is O(n) for each participant addition.

Consider caching the "No organization" ID or using an index lookup:

+  const noOrgId = useMemo(() => {
+    if (!store) return undefined;
+    let foundId: string | undefined;
+    store.forEachRow("organizations", (rowId, forEachCell) => {
+      let name: string | undefined;
+      forEachCell((cellId, cell) => {
+        if (cellId === "name") name = cell as string;
+      });
+      if (name === "No organization") foundId = rowId;
+    });
+    return foundId;
+  }, [store]);
+
   const handleAdd = useCallback((query: string) => {
     if (!store) return;
     
     const humanId = crypto.randomUUID();
     const userId = store.getCell("configs", "singleton", "user_id") as string;
     
-    let orgId: string | undefined;
-    store.forEachRow("organizations", (rowId, forEachCell) => {
-      let name: string | undefined;
-      forEachCell((cellId, cell) => {
-        if (cellId === "name") name = cell as string;
-      });
-      if (name === "No organization") orgId = rowId;
-    });
+    let orgId = noOrgId;
     
     if (!orgId) {
       orgId = crypto.randomUUID();
       store.setRow("organizations", orgId, {
         user_id: userId,
         name: "No organization",
         created_at: new Date().toISOString(),
       });
     }
     
     // ... rest of the function
-  }, [store, sessionId]);
+  }, [store, sessionId, noOrgId]);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88c4f1d and 64873f0.

📒 Files selected for processing (11)
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx (0 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/event.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/folder.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/index.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/listen.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/other.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/recording.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/share.tsx (1 hunks)
  • apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1 hunks)
  • apps/desktop2/src/store/tinybase/persisted.ts (7 hunks)
💤 Files with no reviewable changes (1)
  • apps/desktop2/src/components/main/body/sessions/outer-header.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit configuration file

**/*.{js,ts,tsx,rs}: 1. Do not add any error handling. Keep the existing one.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • apps/desktop2/src/components/main/body/sessions/outer-header/share.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/other.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/index.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/types.ts
  • apps/desktop2/src/components/main/body/sessions/outer-header/event.tsx
  • apps/desktop2/src/store/tinybase/persisted.ts
  • apps/desktop2/src/components/main/body/sessions/outer-header/recording.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/listen.tsx
  • apps/desktop2/src/components/main/body/sessions/outer-header/folder.tsx
🧬 Code graph analysis (9)
apps/desktop2/src/components/main/body/sessions/outer-header/share.tsx (2)
apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1)
  • SessionRowProp (3-5)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)
  • ShareButton (122-128)
apps/desktop2/src/components/main/body/sessions/outer-header/other.tsx (1)
apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1)
  • SessionRowProp (3-5)
apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx (2)
apps/desktop2/src/hooks/useQuery.ts (1)
  • useQuery (3-40)
packages/ui/src/components/block/participants-chip.tsx (2)
  • Participant (6-16)
  • ParticipantGroup (18-21)
apps/desktop2/src/components/main/body/sessions/outer-header/index.tsx (8)
apps/desktop2/src/components/main/body/sessions/outer-header/folder.tsx (1)
  • FolderChain (6-33)
apps/desktop2/src/components/main/body/sessions/outer-header/event.tsx (1)
  • SessionEvent (7-131)
apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx (1)
  • SessionParticipants (7-206)
apps/desktop2/src/components/main/body/sessions/outer-header/recording.tsx (1)
  • RecordingButton (3-9)
apps/desktop2/src/components/main/body/sessions/outer-header/listen.tsx (1)
  • ListenButton (3-9)
apps/desktop2/src/components/main/body/sessions/outer-header/share.tsx (1)
  • ShareButton (3-9)
apps/desktop2/src/components/main/body/sessions/outer-header/other.tsx (1)
  • OthersButton (3-9)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)
  • OuterHeader (6-30)
apps/desktop2/src/components/main/body/sessions/outer-header/event.tsx (2)
apps/desktop2/src/store/tinybase/persisted.ts (1)
  • Event (112-112)
apps/desktop2/src/hooks/useQuery.ts (1)
  • useQuery (3-40)
apps/desktop2/src/store/tinybase/persisted.ts (2)
packages/db/src/schema.ts (2)
  • mappingSessionParticipantSchema (142-142)
  • mappingSessionParticipant (63-67)
apps/desktop2/src/store/tinybase/shared.ts (1)
  • InferTinyBaseSchema (30-33)
apps/desktop2/src/components/main/body/sessions/outer-header/recording.tsx (1)
apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1)
  • SessionRowProp (3-5)
apps/desktop2/src/components/main/body/sessions/outer-header/listen.tsx (2)
apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1)
  • SessionRowProp (3-5)
apps/desktop2/src/components/main/body/sessions/outer-header.tsx (1)
  • ListenButton (114-120)
apps/desktop2/src/components/main/body/sessions/outer-header/folder.tsx (1)
apps/desktop2/src/store/zustand/tabs.ts (1)
  • useTabs (31-121)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ci (windows, windows-latest)
  • GitHub Check: ci (macos, macos-14)
🔇 Additional comments (7)
apps/desktop2/src/components/main/body/sessions/outer-header/types.ts (1)

1-5: LGTM!

Clean type definition that properly derives the session row type from the persisted store hook.

apps/desktop2/src/components/main/body/sessions/outer-header/index.tsx (2)

17-19: Type assertion without verification.

The currentUserId is type-asserted as string | undefined without runtime validation. If the store returns a different type, this could cause issues downstream.

Verify that persisted.UI.useCell for "user_id" always returns a string or undefined. The type assertion assumes this invariant holds.


11-48: LGTM! Well-structured component composition.

The OuterHeader properly composes subcomponents and handles conditional rendering for the folder chain. The layout clearly separates the folder navigation from the action controls.

apps/desktop2/src/components/main/body/sessions/outer-header/folder.tsx (2)

17-17: Unnecessary array copy for reverse operation.

The spread operator [...folderIds] creates a copy before reversing. Since reverse() mutates the array, this copy is necessary to avoid mutating the original folderIds from the hook.

This is correct defensive programming to avoid unintended side effects.


39-41: LGTM! Proper memoization of click handler.

The useCallback correctly includes both openNew and folderId in the dependency array, preventing unnecessary re-renders.

apps/desktop2/src/components/main/body/sessions/outer-header/participant.tsx (2)

77-82: Verify search logic handles empty name correctly.

Line 77 checks name && !name.toLowerCase().includes(normalizedQuery), which will exclude participants with empty names from search results entirely. This might be intentional, but consider whether participants with only email should be searchable.

Confirm whether participants without names but with valid emails should appear in search results when the query matches their email.


208-261: LGTM! Well-memoized participant grouping logic.

The useSessionParticipantGroups hook properly memoizes the participant grouping logic and includes all necessary dependencies.

@yujonglee yujonglee merged commit 9c6381d into main Oct 10, 2025
6 of 7 checks passed
@yujonglee yujonglee deleted the metadata-ui-refactor branch October 10, 2025 06:08
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