Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

chore(dashboard): trim comments in the dashboard source

Carl-Gerhard Lindesvärd13b186a07b88
diff --git a/apps/start/src/agents/models.ts b/apps/start/src/agents/models.ts
index 14ce69e19..4c57abb9b 100644
--- a/apps/start/src/agents/models.ts
+++ b/apps/start/src/agents/models.ts
@@ -1,10 +1,6 @@
-// Re-export the shared model whitelist helpers from
-// `@openpanel/core`'s assistant.constants.
-// Server + client consume the same source, so drift is a compile error
-// rather than a silent "agent not found at runtime".
-//
-// The *available* model list is fetched at runtime via `trpc.chat.models` —
-// it filters by which provider API keys the API process has configured.
+// Shared with the server so drift is a compile error, not a runtime "agent not
+// found". The available models come from `trpc.chat.models`, filtered by the
+// API's configured provider keys.
export type { ChatModelEntry as ChatModelOption } from '@openpanel/core/modules/assistant/assistant.constants';
export {
diff --git a/apps/start/src/components/charts/bar-chart.tsx b/apps/start/src/components/charts/bar-chart.tsx
index 8a2551597..6633b3387 100644
--- a/apps/start/src/components/charts/bar-chart.tsx
+++ b/apps/start/src/components/charts/bar-chart.tsx
@@ -514,7 +514,6 @@ const ChartCore = memo(function ChartCore({
style={{ cursor: canInteract ? 'crosshair' : 'default' }}
transform={`translate(${margin.left},${margin.top})`}
>
- {/* Background rect for mouse event detection */}
<rect
fill="transparent"
height={innerHeight}
diff --git a/apps/start/src/components/charts/highlight-segment.tsx b/apps/start/src/components/charts/highlight-segment.tsx
index a7d41f104..defdf404a 100644
--- a/apps/start/src/components/charts/highlight-segment.tsx
+++ b/apps/start/src/components/charts/highlight-segment.tsx
@@ -3,11 +3,8 @@
import { type MotionValue, motion } from 'motion/react';
import { type RefObject, useId } from 'react';
-// Hover-highlight overlay: re-strokes the base path `d`, clipped to a vertical
-// band whose x/width spring to track the hovered point, so only the segment
-// around the dot shows brighter. The band comes from `useHighlightSegment`;
-// because the bright stroke reuses the base `d`, it follows whatever curve is
-// drawn (see `highlight-segment-bounds.ts` for the band-extent caveat).
+// Re-strokes the base path `d` clipped to the hover band, so the highlight
+// follows whatever curve is drawn (see `highlight-segment-bounds.ts`).
export interface HighlightSegmentProps {
/** Ref to the rendered base stroke `<path>` — its `d` is re-used verbatim. */
diff --git a/apps/start/src/components/charts/tooltip/chart-tooltip.tsx b/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
index 317f123cf..2d921fd87 100644
--- a/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
+++ b/apps/start/src/components/charts/tooltip/chart-tooltip.tsx
@@ -207,7 +207,6 @@ const ChartTooltipInner = memo(function ChartTooltipInner({
</svg>
)}
- {/* Tooltip Box */}
<TooltipBox
className={className}
containerHeight={height}
diff --git a/apps/start/src/components/charts/tooltip/date-ticker.tsx b/apps/start/src/components/charts/tooltip/date-ticker.tsx
index f0cff737f..fa9fdda61 100644
--- a/apps/start/src/components/charts/tooltip/date-ticker.tsx
+++ b/apps/start/src/components/charts/tooltip/date-ticker.tsx
@@ -96,7 +96,6 @@ const DateTickerInner = memo(function DateTickerInner({
<div className="overflow-hidden rounded-full bg-zinc-900 px-4 py-1 text-white shadow-lg dark:bg-zinc-100 dark:text-zinc-900">
<div className="relative h-6 overflow-hidden">
<div className="flex items-center justify-center gap-1">
- {/* Month stack */}
<div className="relative h-6 overflow-hidden">
<motion.div className="flex flex-col" style={{ y: monthY }}>
{monthSegments.map((segment) => (
@@ -112,7 +111,6 @@ const DateTickerInner = memo(function DateTickerInner({
</motion.div>
</div>
- {/* Day stack */}
<div className="relative h-6 overflow-hidden">
<motion.div className="flex flex-col" style={{ y: dayY }}>
{parsedLabels.map((label) => (
diff --git a/apps/start/src/components/charts/use-highlight-segment.ts b/apps/start/src/components/charts/use-highlight-segment.ts
index 2e665be03..fe184e15b 100644
--- a/apps/start/src/components/charts/use-highlight-segment.ts
+++ b/apps/start/src/components/charts/use-highlight-segment.ts
@@ -9,11 +9,7 @@ import {
INACTIVE_SEGMENT,
} from './highlight-segment-bounds';
-// Hover-highlight band for `line.tsx` and `area.tsx`. Computes the segment
-// bounds and springs its x/width; `<HighlightSegment>` renders the clipped
-// re-stroke. Spring tuning comes from `ChartConfigProvider.highlightSpring`.
-// Stable + hover slices are read separately so callers can see the exact
-// subscription surface (anything calling this hook will re-render on hover).
+// Anything calling this hook re-renders on hover.
export interface HighlightSegmentResult {
xSpring: ReturnType<typeof useSpring>;
diff --git a/apps/start/src/components/chat/chat-context.tsx b/apps/start/src/components/chat/chat-context.tsx
index 8e74370e9..42f914c41 100644
--- a/apps/start/src/components/chat/chat-context.tsx
+++ b/apps/start/src/components/chat/chat-context.tsx
@@ -40,11 +40,8 @@ interface ChatStateValue {
isOpen: boolean;
/**
- * Open the drawer with a fresh conversation. This is the default
- * "Ask AI" / ⌘J behavior — previously this resumed a per-page
- * conversation from localStorage, but that added a second source of
- * truth next to the URL and was removed. The header's conversation
- * dropdown is the way to resume a prior conversation.
+ * Open the drawer with a fresh conversation (the default "Ask AI" / ⌘J
+ * behavior). The header's conversation dropdown resumes a prior one.
*/
openChatForContext: () => void;
/**
diff --git a/apps/start/src/components/chat/chat-drawer.tsx b/apps/start/src/components/chat/chat-drawer.tsx
index 5c7dcc2bb..7584887e3 100644
--- a/apps/start/src/components/chat/chat-drawer.tsx
+++ b/apps/start/src/components/chat/chat-drawer.tsx
@@ -68,13 +68,7 @@ export function ChatDrawer() {
return (
<>
- {/*
- Spacer in the flex layout — the aside is `fixed` so the main
- content would otherwise render under it. This empty div takes
- the drawer's width on `lg+` so the page naturally shrinks.
- Hidden on mobile where the drawer overlays as a modal-style
- panel (standard behavior for narrow viewports).
- */}
+ {/* The aside is `fixed`; this spacer makes the page shrink on `lg+`. */}
<div aria-hidden className="hidden shrink-0 lg:block" style={{ width }} />
<aside
className="fixed top-0 right-0 z-40 flex h-screen flex-col border-l bg-background shadow-2xl"
@@ -86,20 +80,8 @@ export function ChatDrawer() {
{...dragHandleProps}
/>
<ChatDrawerHeader onClose={closeChat} projectId={projectId} />
- {/*
- Three states, all derived from the `chat.models` tRPC query
- (see `ChatStateProvider`). The frontend no longer reads any
- AI-specific env vars — empty models list = not configured.
- 1. `isAiEnabled === false` — the API returned zero models,
- meaning no provider keys are set. Skip the runtime and
- render the setup-instructions empty state.
- 2. `isAiEnabled` is `null` or `agentName` is still empty —
- models query in flight. Render a placeholder so we don't
- crash `useAgent({ agent: '' })`.
- 3. `agentName` resolved — mount the runtime as normal.
- `key={conversationId}` remounts the `useAgent` controller
- on conversation switches to force a fresh hydrate.
- */}
+ {/* `key={conversationId}` remounts the runtime so a switch re-hydrates. The
+ placeholder avoids `useAgent({ agent: '' })` while models load. */}
{isAiEnabled === false ? (
<ChatDrawerNotConfigured />
) : agentName ? (
diff --git a/apps/start/src/components/chat/chat-runtime.tsx b/apps/start/src/components/chat/chat-runtime.tsx
index 6abfac2a4..4281c78f8 100644
--- a/apps/start/src/components/chat/chat-runtime.tsx
+++ b/apps/start/src/components/chat/chat-runtime.tsx
@@ -19,20 +19,9 @@ import { useAppParams } from '@/hooks/use-app-params';
import { useTRPC } from '@/integrations/trpc/react';
/**
- * Drawer-scoped runtime that owns the `useAgent()` instance and exposes
- * `messages`, `status`, `sendMessage`, `stop` to body + footer via a
- * tiny context. Mounts inside the drawer, between the header and the
- * body/footer pair.
- *
- * Why this is here and not in a global provider:
- * - The `useAgent()` call itself is a hook — it can't move without
- * mounting. Putting it on the drawer means the chat client is
- * only active when the drawer is open.
- * - Page context is read here so every send carries the user's
- * current view (project, page, filters). Re-evaluates on each
- * send via the closure — no refs needed.
- * - When `agentName` or `conversationId` changes, the controller
- * rebuilds. Better Agent handles hydration via `hydrateFromServer`.
+ * Drawer-scoped runtime that owns the `useAgent()` instance, so the chat
+ * client is only active while the drawer is open. Page context is read per
+ * send, so every message carries the user's current view.
*/
type ChatRuntimeValue = ReturnType<typeof useAgent> & {
@@ -130,9 +119,7 @@ export function ChatRuntimeProvider({ children }: { children: ReactNode }) {
// set — it's the in-memory source of truth for this session.
// It gets cleared on `newConversation()` / `switchConversation()`.
if (isFirstTurn) {
- // Cancel any previously in-flight title (shouldn't exist on
- // a first turn, but defensive) and start a fresh controller
- // bound to this runtime's lifecycle.
+ // Defensive: a first turn should have no title request in flight.
titleAbortRef.current?.abort();
const controller = new AbortController();
titleAbortRef.current = controller;
diff --git a/apps/start/src/components/chat/tool-handlers.ts b/apps/start/src/components/chat/tool-handlers.ts
index f73f526a6..191471c6d 100644
--- a/apps/start/src/components/chat/tool-handlers.ts
+++ b/apps/start/src/components/chat/tool-handlers.ts
@@ -148,9 +148,8 @@ export const chatToolHandlers: ChatClientToolHandlers = {
/**
* Applies every part of one filter command in a single navigation.
*
- * The overview's AI command used to await the three handlers in turn, so a
- * command like "last 30 days, mobile only" pushed two history entries and ran
- * every overview query twice.
+ * One navigation, so a command like "last 30 days, mobile only" pushes one
+ * history entry and runs the overview queries once.
*/
export function applyFilterCommandToUrl(command: {
// `range` and `operator` are widened to `string` on purpose.
@@ -159,8 +158,7 @@ export function applyFilterCommandToUrl(command: {
// hand-list subsets: they are missing `last24h` and `3m` for range, and
// `inCohort`/`notInCohort` for operator. Both values are written verbatim
// into search params that the overview's own parsers then validate, so the
- // wider types are correct here — and they keep the drift visible instead of
- // hiding it behind the cast the tool-handler map used to apply.
+ // wider types are correct here and keep the drift visible.
applyFilters?: (Omit<ApplyFiltersInput, 'range'> & { range?: string }) | null;
setPropertyFilters?: {
filters: (Omit<PropertyFilter, 'operator'> & { operator?: string })[];
diff --git a/apps/start/src/components/chat/tool-results/output-types.ts b/apps/start/src/components/chat/tool-results/output-types.ts
index 4557c42cb..26c023549 100644
--- a/apps/start/src/components/chat/tool-results/output-types.ts
+++ b/apps/start/src/components/chat/tool-results/output-types.ts
@@ -9,20 +9,12 @@
* we narrow with predicates rather than `as any`.
*/
-// ────────────────────────────────────────────────────────────────────
-// Metrics (get_analytics_overview, get_profile_metrics)
-// ────────────────────────────────────────────────────────────────────
-
export type MetricsLike = Record<string, unknown>;
export function isMetricsLike(value: unknown): value is MetricsLike {
return value !== null && typeof value === 'object' && !Array.isArray(value);
}
-// ────────────────────────────────────────────────────────────────────
-// Profile full (get_profile_full)
-// ────────────────────────────────────────────────────────────────────
-
export type ProfileMetrics = {
sessions?: number;
totalEvents?: number;
@@ -65,10 +57,6 @@ export function asProfileFullOutput(value: unknown): ProfileFullOutput | null {
return value as ProfileFullOutput;
}
-// ────────────────────────────────────────────────────────────────────
-// Report (get_report_data, generate_report, preview_report_with_changes)
-// ────────────────────────────────────────────────────────────────────
-
export type ReportOutput = {
data?: unknown;
report?: {
@@ -88,10 +76,6 @@ export function asReportOutput(value: unknown): ReportOutput | null {
return value as ReportOutput;
}
-// ────────────────────────────────────────────────────────────────────
-// Tables (top_pages, top_referrers, country_breakdown, etc.)
-// ────────────────────────────────────────────────────────────────────
-
export type TableRow = Record<string, unknown>;
export type TableNormalized = {
diff --git a/apps/start/src/components/events/event-icon.test.tsx b/apps/start/src/components/events/event-icon.test.tsx
index 5bbc1460f..cff97b4e0 100644
--- a/apps/start/src/components/events/event-icon.test.tsx
+++ b/apps/start/src/components/events/event-icon.test.tsx
@@ -3,7 +3,7 @@
// `meta.icon` is a free-text column an operator fills in, so it can name an
// icon `EventIconMapper` does not carry — or be the empty string, which is
// not nullish and therefore survives the `??` chain. Either way the lookup
-// used to yield `undefined`, and rendering `undefined` as a component makes
+// must not yield `undefined`, because rendering `undefined` as a component makes
// React throw "Element type is invalid" and discard the whole subtree. On the
// mobile events list (`event-list-item.tsx`) that is the entire page.
diff --git a/apps/start/src/components/events/table/index.tsx b/apps/start/src/components/events/table/index.tsx
index c2ee7cc33..9669c01f5 100644
--- a/apps/start/src/components/events/table/index.tsx
+++ b/apps/start/src/components/events/table/index.tsx
@@ -164,7 +164,6 @@ const VirtualizedEventsTable = ({
className="w-full overflow-x-auto rounded-md border bg-card"
ref={parentRef}
>
- {/* Table Header */}
<div
className="sticky top-0 z-10 border-b bg-card"
style={{
@@ -199,7 +198,6 @@ const VirtualizedEventsTable = ({
/>
)}
- {/* Table Body */}
<div
className="relative w-full"
style={{
diff --git a/apps/start/src/components/facehash/facehash.tsx b/apps/start/src/components/facehash/facehash.tsx
index 94ed7b5bf..505f3f6a7 100644
--- a/apps/start/src/components/facehash/facehash.tsx
+++ b/apps/start/src/components/facehash/facehash.tsx
@@ -2,10 +2,6 @@ import * as React from 'react';
import { FACES } from './faces';
import { stringHash } from './utils/hash';
-// ============================================================================
-// Types
-// ============================================================================
-
export type Intensity3D = 'none' | 'subtle' | 'medium' | 'dramatic';
export type Variant = 'gradient' | 'solid';
@@ -101,10 +97,6 @@ export interface FacehashProps
gradientOverlayClass?: string;
}
-// ============================================================================
-// Constants
-// ============================================================================
-
const INTENSITY_PRESETS = {
none: {
rotateRange: 0,
@@ -171,10 +163,6 @@ const DEFAULT_GRADIENT_STYLE: React.CSSProperties = {
'radial-gradient(ellipse 100% 100% at 50% 50%, rgba(255,255,255,0.15) 0%, transparent 60%)',
};
-// ============================================================================
-// Component
-// ============================================================================
-
/**
* Facehash - Deterministic avatar faces from any string.
*/
diff --git a/apps/start/src/components/insights/insight-card.tsx b/apps/start/src/components/insights/insight-card.tsx
index 984d88073..971e2aeca 100644
--- a/apps/start/src/components/insights/insight-card.tsx
+++ b/apps/start/src/components/insights/insight-card.tsx
@@ -115,7 +115,6 @@ export function InsightCard({
<Badge className="-ml-2" variant="outline">
{formatWindowKind(insight.windowKind)}
</Badge>
- {/* Severity: subtle dot instead of big pill */}
{insight.severityBand && (
<div className="flex shrink-0 items-center gap-1">
<span
@@ -166,14 +165,12 @@ export function InsightCard({
{renderTitle()}
</div>
- {/* AI plain-language summary (Tier-1 enrichment) */}
{insight.aiSummary && (
<p className="mt-1 line-clamp-3 text-muted-foreground text-xs leading-snug">
{insight.aiSummary}
</p>
)}
- {/* Metric row */}
<div className="mt-auto pt-2">
<div className="flex items-end justify-between gap-3">
<div className="min-w-0">
@@ -186,7 +183,6 @@ export function InsightCard({
{formatValue(currentValue)}
</div>
- {/* Inline compare, smaller */}
{compareValue != null && (
<div className="text-muted-foreground text-xs">
vs {formatValue(compareValue)}
@@ -195,7 +191,6 @@ export function InsightCard({
</div>
</div>
- {/* Delta chip */}
<DeltaChip
size="sm"
variant={isIncrease ? 'inc' : isDecrease ? 'dec' : 'default'}
diff --git a/apps/start/src/components/integrations/forms/s3-export-integration.tsx b/apps/start/src/components/integrations/forms/s3-export-integration.tsx
index 4ee42c614..2ec784848 100644
--- a/apps/start/src/components/integrations/forms/s3-export-integration.tsx
+++ b/apps/start/src/components/integrations/forms/s3-export-integration.tsx
@@ -198,7 +198,6 @@ export function S3ExportIntegrationForm({
</div>
</div>
- {/* Auth Mode Selector */}
<div className="col gap-1.5">
<label className="font-medium text-sm">Authentication Mode</label>
<Controller
@@ -225,7 +224,6 @@ export function S3ExportIntegrationForm({
</p>
</div>
- {/* IAM Role fields */}
{authMode === 'iam_role' && (
<>
<InputWithLabel
@@ -250,7 +248,6 @@ export function S3ExportIntegrationForm({
</>
)}
- {/* Access Key fields */}
{authMode === 'access_key' && (
<>
<InputWithLabel
diff --git a/apps/start/src/components/login-left-panel.tsx b/apps/start/src/components/login-left-panel.tsx
index fe68090ea..524ea523d 100644
--- a/apps/start/src/components/login-left-panel.tsx
+++ b/apps/start/src/components/login-left-panel.tsx
@@ -63,7 +63,6 @@ const sellingPoints = [
export function LoginLeftPanel() {
return (
<div className="relative h-screen overflow-hidden">
- {/* Carousel */}
<div className="mt-24 flex h-full items-center justify-center">
<Carousel
className="h-full w-full [&>div]:h-full [&>div]:min-h-full"
diff --git a/apps/start/src/components/notifications/table/columns.tsx b/apps/start/src/components/notifications/table/columns.tsx
index 3a162e410..69243c5ec 100644
--- a/apps/start/src/components/notifications/table/columns.tsx
+++ b/apps/start/src/components/notifications/table/columns.tsx
@@ -25,7 +25,6 @@ export function useColumns() {
const { title } = row.original;
return (
<div className="row items-center gap-2">
- {/* {isReadAt === null && <PingBadge>Unread</PingBadge>} */}
<span className="max-w-md truncate font-medium">{title}</span>
</div>
);
diff --git a/apps/start/src/components/onboarding/activation-banner.tsx b/apps/start/src/components/onboarding/activation-banner.tsx
index 8df35b5b0..534737237 100644
--- a/apps/start/src/components/onboarding/activation-banner.tsx
+++ b/apps/start/src/components/onboarding/activation-banner.tsx
@@ -10,11 +10,9 @@ import { pushModal } from '@/modals';
import { cn } from '@/utils/cn';
import { op } from '@/utils/op';
-// The project's first funnel: event -> report -> teammate, drawn as three
-// nodes on a progress track. The current step carries the product's live ping
-// dot, and while the first event is missing the query polls so the banner
-// flips green by itself the moment data arrives. Steps derive from existing
-// data (Project.firstEventAt, report count, member count) — no state machine.
+// Steps derive from existing data (Project.firstEventAt, report count, member
+// count). While the first event is missing the query polls so the banner
+// flips by itself.
const dismissKey = (projectId: string) =>
`op-activation-checklist-dismissed:${projectId}`;
diff --git a/apps/start/src/components/onboarding/steps.tsx b/apps/start/src/components/onboarding/steps.tsx
index 3c5d1051b..e05083158 100644
--- a/apps/start/src/components/onboarding/steps.tsx
+++ b/apps/start/src/components/onboarding/steps.tsx
@@ -100,9 +100,6 @@ export const OnboardingSteps = ({ className }: Props) => {
)}
<div className="relative">
{step.status === 'completed' && <CheckCheckIcon size={14} />}
- {/* {step.status === 'current' && (
- <ArrowRightCircleIcon size={14} />
- )} */}
{(step.status === 'pending' || step.status === 'current') &&
index + 1}
</div>
diff --git a/apps/start/src/components/organization/billing-usage.tsx b/apps/start/src/components/organization/billing-usage.tsx
index e3ee5c825..0f47ccb7e 100644
--- a/apps/start/src/components/organization/billing-usage.tsx
+++ b/apps/start/src/components/organization/billing-usage.tsx
@@ -219,7 +219,6 @@ export default function BillingUsage({ organization }: Props) {
</>
)}
</div>
- {/* Events Chart */}
<div className="space-y-2">
<h3 className="font-medium text-muted-foreground text-sm">
{useWeeklyIntervals ? 'Weekly Events' : 'Daily Events'}
diff --git a/apps/start/src/components/organization/prompt-card.tsx b/apps/start/src/components/organization/prompt-card.tsx
index 22bf51908..c823f095a 100644
--- a/apps/start/src/components/organization/prompt-card.tsx
+++ b/apps/start/src/components/organization/prompt-card.tsx
@@ -22,8 +22,8 @@ export function PromptCard({
}: PromptCardProps) {
// `show` comes from a cookie, which the server can read, so this card can
// render during SSR. framer writes its `initial` transform and opacity into
- // the style attribute and the client's first frame differs, so React threw
- // the tree away (ISSUES.md H10). Waiting for mount keeps the slide-in —
+ // the style attribute and the client's first frame differs, so React throws
+ // the tree away. Waiting for mount keeps the slide-in —
// `initial={false}` would have removed it — and costs nothing, since the
// card is a popup nobody expects in the server-rendered HTML.
const [mounted, setMounted] = useState(false);
diff --git a/apps/start/src/components/overview/filters/overview-filters-buttons.tsx b/apps/start/src/components/overview/filters/overview-filters-buttons.tsx
index 57cc1c7fa..5d3911855 100644
--- a/apps/start/src/components/overview/filters/overview-filters-buttons.tsx
+++ b/apps/start/src/components/overview/filters/overview-filters-buttons.tsx
@@ -170,7 +170,6 @@ function FilterPill({
{getPropertyLabel(filter.name)}
</button>
- {/* Operator dropdown */}
<FilterOperatorSelect onChange={onChangeOperator} value={filter.operator}>
<button
className="cursor-pointer border-l px-2 lowercase opacity-50 transition-colors hover:bg-accent hover:opacity-100"
@@ -200,7 +199,6 @@ function FilterPill({
</ComboboxAdvanced>
)}
- {/* Remove */}
<button
aria-label="Remove filter"
className="cursor-pointer border-l px-2 transition-colors hover:bg-destructive hover:text-destructive-foreground"
diff --git a/apps/start/src/components/overview/overview-weekly-trends.tsx b/apps/start/src/components/overview/overview-weekly-trends.tsx
index 09f5131b0..28f1b879d 100644
--- a/apps/start/src/components/overview/overview-weekly-trends.tsx
+++ b/apps/start/src/components/overview/overview-weekly-trends.tsx
@@ -177,9 +177,7 @@ export default function OverviewWeeklyTrends({
</div>
) : heatmap ? (
<div className="flex">
- {/* Hour labels */}
<div className="w-14 shrink-0 pr-2">
- {/* Spacer for the day-label row */}
<div className="h-6" />
{Array.from({ length: 24 }, (_, hour) => (
<div
@@ -191,9 +189,7 @@ export default function OverviewWeeklyTrends({
))}
</div>
- {/* Grid */}
<div className="min-w-0 flex-1">
- {/* Day labels */}
<div className="flex h-6">
{SHORT_DAY_NAMES.map((day) => (
<div
@@ -206,7 +202,6 @@ export default function OverviewWeeklyTrends({
</div>
<TooltipProvider delayDuration={0} disableHoverableContent>
- {/* Rows = hours, columns = days */}
{Array.from({ length: 24 }, (_, hour) => (
<div className="flex h-4" key={hour}>
{Array.from({ length: 7 }, (_, day) => {
diff --git a/apps/start/src/components/overview/overview-widget-table.tsx b/apps/start/src/components/overview/overview-widget-table.tsx
index 400ee27fa..dddd94ac7 100644
--- a/apps/start/src/components/overview/overview-widget-table.tsx
+++ b/apps/start/src/components/overview/overview-widget-table.tsx
@@ -18,7 +18,6 @@ function RevenuePieChart({ percentage }: { percentage: number }) {
return (
<svg className="flex-shrink-0" height={size} width={size}>
- {/* Background circle */}
<circle
className="text-def-200"
cx={size / 2}
@@ -28,7 +27,6 @@ function RevenuePieChart({ percentage }: { percentage: number }) {
stroke="currentColor"
strokeWidth={strokeWidth}
/>
- {/* Revenue arc */}
<circle
className="transition-all"
cx={size / 2}
diff --git a/apps/start/src/components/overview/overview-widget.tsx b/apps/start/src/components/overview/overview-widget.tsx
index 37efa8336..d76583738 100644
--- a/apps/start/src/components/overview/overview-widget.tsx
+++ b/apps/start/src/components/overview/overview-widget.tsx
@@ -237,9 +237,7 @@ export function WidgetHeadSearchable<T extends string>({
return (
<div className={cn('border-border border-b', className)}>
- {/* Scrollable tabs container */}
<div className="relative">
- {/* Left gradient */}
<div
className={cn(
'pointer-events-none absolute top-0 left-0 z-10 h-full w-8 bg-gradient-to-r from-card to-transparent transition-opacity duration-200',
@@ -247,7 +245,6 @@ export function WidgetHeadSearchable<T extends string>({
)}
/>
- {/* Scrollable tabs */}
<div
className="hide-scrollbar flex gap-1 overflow-x-auto px-2 py-3"
ref={scrollRef}
@@ -269,7 +266,6 @@ export function WidgetHeadSearchable<T extends string>({
))}
</div>
- {/* Right gradient */}
<div
className={cn(
'pointer-events-none absolute top-0 right-0 bottom-px z-10 w-8 bg-gradient-to-l from-card to-transparent transition-opacity duration-200',
@@ -278,7 +274,6 @@ export function WidgetHeadSearchable<T extends string>({
/>
</div>
- {/* Search input */}
{onSearchChange && (
<div className="relative">
<SearchIcon className="absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground" />
diff --git a/apps/start/src/components/pages/table/columns.tsx b/apps/start/src/components/pages/table/columns.tsx
index dfc8217b8..17264f196 100644
--- a/apps/start/src/components/pages/table/columns.tsx
+++ b/apps/start/src/components/pages/table/columns.tsx
@@ -40,9 +40,8 @@ export function useColumns({
const page = row.original;
return (
<div className="flex min-w-0 items-center gap-3">
- {/* No origin means no favicon to fetch; the request used to go
- out anyway as `?url=` and answer 404 on every render. The
- value is also user data, so it is encoded. */}
+ {/* No origin means no favicon to fetch (`?url=` would 404). The
+ value is user data, so it is encoded. */}
{page.origin ? (
<img
alt=""
@@ -114,7 +113,7 @@ export function useColumns({
);
// The count is always known. Only the comparison depends on having a
// previous period, so a missing `prev` hides the delta, not the
- // number — it used to replace the whole cell with an em dash.
+ // number.
const count = (
<span className="font-mono text-sm tabular-nums">
{number.short(row.original.sessions)}
diff --git a/apps/start/src/components/realtime/map/coordinates.ts b/apps/start/src/components/realtime/map/coordinates.ts
index 7f66c12c5..ad48c3507 100644
--- a/apps/start/src/components/realtime/map/coordinates.ts
+++ b/apps/start/src/components/realtime/map/coordinates.ts
@@ -365,8 +365,6 @@ export function clusterCoordinates(
adjustedRadius = radius * Math.max(0.5, 1 / Math.sqrt(zoom));
}
- // Always use basic clustering for now to ensure it works correctly
- // TODO: Re-enable optimized clustering after thorough testing
const result = basicClusterCoordinates(coordinates, adjustedRadius);
if (detailLevel === 'coordinate') {
@@ -462,9 +460,6 @@ function basicClusterCoordinates(coordinates: Coordinate[], radius: number) {
return clusters;
}
-// Note: Optimized clustering algorithm was removed temporarily
-// TODO: Re-implement optimized clustering after basic algorithm is working well
-
export function getClusteringStats(
coordinates: Coordinate[],
clusters: ReturnType<typeof clusterCoordinates>
diff --git a/apps/start/src/components/realtime/realtime-live-histogram.tsx b/apps/start/src/components/realtime/realtime-live-histogram.tsx
index c634e6c11..2a88b550a 100644
--- a/apps/start/src/components/realtime/realtime-live-histogram.tsx
+++ b/apps/start/src/components/realtime/realtime-live-histogram.tsx
@@ -52,24 +52,7 @@ export function RealtimeLiveHistogram({
Math.max(...chartData.map((item) => item.visitorCount), 0) * 1.2 || 1;
return (
- <Wrapper
- count={totalVisitors}
- // icons={
- // liveData.referrers && liveData.referrers.length > 0 ? (
- // <div className="row shrink-0 gap-2">
- // {liveData.referrers.slice(0, 3).map((ref, index) => (
- // <div
- // className="row items-center gap-1 font-bold text-xs"
- // key={`${ref.referrer}-${ref.count}-${index}`}
- // >
- // <SerieIcon name={ref.referrer} />
- // <span>{number.short(ref.count)}</span>
- // </div>
- // ))}
- // </div>
- // ) : null
- // }
- >
+ <Wrapper count={totalVisitors}>
<ResponsiveContainer height="100%" width="100%">
<BarChart
data={chartData}
diff --git a/apps/start/src/components/report-chart/bar/chart.tsx b/apps/start/src/components/report-chart/bar/chart.tsx
index 0fa19fde2..e49429ec5 100644
--- a/apps/start/src/components/report-chart/bar/chart.tsx
+++ b/apps/start/src/components/report-chart/bar/chart.tsx
@@ -189,7 +189,6 @@ export function Chart({ data }: Props) {
role={isClickable ? 'button' : undefined}
tabIndex={isClickable ? 0 : undefined}
>
- {/* Subtle accent glow */}
<div
className="pointer-events-none absolute -top-10 -left-10 h-40 w-96 rounded-full opacity-0 blur-3xl transition-opacity duration-500 group-hover:opacity-10"
style={{
@@ -301,7 +300,6 @@ export function Chart({ data }: Props) {
</div>
</div>
- {/* Bar */}
<div className="flex items-center">
<div className="h-1.5 flex-1 overflow-hidden rounded-full bg-def-100 dark:bg-def-900">
<div
diff --git a/apps/start/src/components/report-chart/bar/index.tsx b/apps/start/src/components/report-chart/bar/index.tsx
index 0f9c5382a..345f3a3fa 100644
--- a/apps/start/src/components/report-chart/bar/index.tsx
+++ b/apps/start/src/components/report-chart/bar/index.tsx
@@ -9,7 +9,7 @@ import { cn } from '@/utils/cn';
// Fixed, not random. The server and the browser each rendered their own
// widths, so every skeleton row was an attribute mismatch and React threw the
-// SSR tree away (ISSUES.md H10). The exact values do not matter; only that
+// SSR tree away. The exact values do not matter; only that
// both renders agree.
const SKELETON_NAME_WIDTHS = [186, 134, 158, 112, 170, 126, 194, 148, 120, 176];
const SKELETON_BAR_WIDTHS = [72, 48, 63, 35, 57, 41, 78, 52, 29, 66];
@@ -64,17 +64,14 @@ function Loading() {
<div className="relative z-10 flex flex-col gap-2">
<div className="flex items-center justify-between gap-4">
<div className="flex min-w-0 items-center gap-3">
- {/* Icon skeleton */}
<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border bg-def-100 dark:border-def-800 dark:bg-def-900" />
<div className="min-w-0">
- {/* Rank badge skeleton */}
<div className="mb-1 flex items-center gap-2">
<div className="h-2 w-2 rounded-full bg-def-200 dark:bg-def-700" />
<div className="h-2 w-12 rounded bg-def-200 dark:bg-def-700" />
</div>
- {/* Name skeleton */}
<div
className="h-4 rounded bg-def-200 dark:bg-def-700"
style={{
@@ -84,13 +81,11 @@ function Loading() {
</div>
</div>
- {/* Count skeleton */}
<div className="flex shrink-0 flex-col items-end gap-1">
<div className="h-5 w-16 rounded bg-def-200 dark:bg-def-700" />
</div>
</div>
- {/* Bar skeleton */}
<div className="flex items-center">
<div className="h-1.5 flex-1 overflow-hidden rounded-full bg-def-100 dark:bg-def-900">
<div
diff --git a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
index 94b28a0df..fe7266d86 100644
--- a/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
+++ b/apps/start/src/components/report-chart/common/previous-diff-indicator.tsx
@@ -21,8 +21,6 @@ export function getDiffIndicator<A, B, C>(
return state === 'positive' ? positive : negative;
}
-// TODO: Fix this mess!
-
interface PreviousDiffIndicatorProps {
diff?: number | null | undefined;
state?: string | null | undefined;
diff --git a/apps/start/src/components/report-chart/funnel/breakdown-list.tsx b/apps/start/src/components/report-chart/funnel/breakdown-list.tsx
index f3f8004ed..b3ba931fc 100644
--- a/apps/start/src/components/report-chart/funnel/breakdown-list.tsx
+++ b/apps/start/src/components/report-chart/funnel/breakdown-list.tsx
@@ -90,14 +90,12 @@ export function BreakdownList({
return (
<div className="col" key={item.id}>
- {/* Compact row */}
<div
className={cn(
'card row w-full items-center gap-3 px-4 py-3 text-left',
isExpanded && 'rounded-b-none'
)}
>
- {/* Chart visibility checkbox */}
{hasBreakdowns && (
<Checkbox
checked={isVisible}
@@ -110,7 +108,6 @@ export function BreakdownList({
/>
)}
- {/* Expandable row content */}
<button
className="flex min-w-0 flex-1 items-center gap-3 transition-opacity hover:opacity-80"
onClick={() => toggleExpanded(item.id)}
@@ -160,7 +157,6 @@ export function BreakdownList({
</div>
</div>
- {/* Expanded detailed view */}
{isExpanded && (
<Tables
data={{
diff --git a/apps/start/src/components/report-chart/line/chart.tsx b/apps/start/src/components/report-chart/line/chart.tsx
index 43197cd44..de6c1ad8b 100644
--- a/apps/start/src/components/report-chart/line/chart.tsx
+++ b/apps/start/src/components/report-chart/line/chart.tsx
@@ -303,7 +303,6 @@ export function Chart({ data }: Props) {
);
})}
- {/* Previous */}
{previous
? series.map((serie) => {
const color = getChartColor(serie.index);
diff --git a/apps/start/src/components/sessions/replay/replay-timeline.tsx b/apps/start/src/components/sessions/replay/replay-timeline.tsx
index e931f9b6d..af3a1c012 100644
--- a/apps/start/src/components/sessions/replay/replay-timeline.tsx
+++ b/apps/start/src/components/sessions/replay/replay-timeline.tsx
@@ -215,7 +215,6 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
ref={thumbRef}
style={{ left: `calc(${progressPct}% - 8px)` }}
/>
- {/* Hover timestamp tooltip */}
<AnimatePresence>
{hoverInfo && (
<motion.div
@@ -230,9 +229,7 @@ export function ReplayTimeline({ events }: { events: IServiceEvent[] }) {
}}
transition={{ duration: 0.15 }}
>
- {/* Vertical line */}
<div className="absolute top-1/2 left-0 h-4 w-px -translate-x-1/2 -translate-y-1/2 bg-foreground/30" />
- {/* Timestamp badge */}
<motion.div
animate={{ opacity: 1, y: 0, scale: 1 }}
className="absolute bottom-6 left-1/2 mb-1.5 -translate-x-1/2 whitespace-nowrap rounded bg-foreground px-1.5 py-0.5 text-[10px] text-background tabular-nums shadow"
diff --git a/apps/start/src/components/sessions/table/index.tsx b/apps/start/src/components/sessions/table/index.tsx
index d09ead065..799bed28b 100644
--- a/apps/start/src/components/sessions/table/index.tsx
+++ b/apps/start/src/components/sessions/table/index.tsx
@@ -196,7 +196,6 @@ const VirtualizedSessionsTable = ({
className="w-full overflow-x-auto rounded-md border bg-card"
ref={parentRef}
>
- {/* Table Header */}
<div
className="sticky top-0 z-10 border-b bg-card"
style={{
@@ -231,7 +230,6 @@ const VirtualizedSessionsTable = ({
/>
)}
- {/* Table Body */}
<div
className="relative w-full"
style={{
@@ -291,7 +289,6 @@ export const SessionsTable = ({ query }: Props) => {
return query.data?.pages?.flatMap((p) => p.items) ?? [];
}, [query.data, isLoading]);
- // const { setPage, state: pagination } = useDataTablePagination();
const { columnVisibility, setColumnVisibility } =
usePersistentColumnVisibility(columns);
diff --git a/apps/start/src/components/settings/project-access-grants.tsx b/apps/start/src/components/settings/project-access-grants.tsx
index 9a04cc785..f48c3dd9f 100644
--- a/apps/start/src/components/settings/project-access-grants.tsx
+++ b/apps/start/src/components/settings/project-access-grants.tsx
@@ -16,9 +16,7 @@ interface ProjectAccessGrantsProps {
/**
* Picks the projects a member may reach and, for each, whether they may change
- * anything in it. The level used to be hardcoded server-side, so `read` was
- * assigned to people who were meant to have `write` - and nothing enforced it
- * either way. Both halves are real now, so it has to be chooseable.
+ * anything in it.
*/
export function ProjectAccessGrants({
value,
diff --git a/apps/start/src/components/sidebar-organization-menu.tsx b/apps/start/src/components/sidebar-organization-menu.tsx
index 67f5b0e8d..1932774c8 100644
--- a/apps/start/src/components/sidebar-organization-menu.tsx
+++ b/apps/start/src/components/sidebar-organization-menu.tsx
@@ -159,7 +159,7 @@ export function ActionCTAButton() {
<div className="relative flex h-5 flex-1 items-center overflow-hidden">
{/* `initial={false}` suppresses only the FIRST mount: framer writes
transform/opacity into the style attribute, and the SSR string
- differs from the client's first frame (ISSUES.md H10). The
+ differs from the client's first frame. The
cycling animation between actions is unaffected. */}
<AnimatePresence initial={false} mode="popLayout">
<motion.span
diff --git a/apps/start/src/components/sidebar-project-menu.tsx b/apps/start/src/components/sidebar-project-menu.tsx
index 6055b07a1..2e66633f4 100644
--- a/apps/start/src/components/sidebar-project-menu.tsx
+++ b/apps/start/src/components/sidebar-project-menu.tsx
@@ -171,7 +171,7 @@ export function ActionCTAButton() {
<div className="relative flex h-5 flex-1 items-center overflow-hidden">
{/* `initial={false}` suppresses only the FIRST mount: framer writes
transform/opacity into the style attribute, and the SSR string
- differs from the client's first frame (ISSUES.md H10). The
+ differs from the client's first frame. The
cycling animation between actions is unaffected. */}
<AnimatePresence initial={false} mode="popLayout">
<motion.span
diff --git a/apps/start/src/components/skeleton-dashboard.tsx b/apps/start/src/components/skeleton-dashboard.tsx
index f5b499619..7e8e6330e 100644
--- a/apps/start/src/components/skeleton-dashboard.tsx
+++ b/apps/start/src/components/skeleton-dashboard.tsx
@@ -2,15 +2,12 @@ export function SkeletonDashboard() {
return (
<div className="fixed inset-0 overflow-hidden bg-gradient-to-br from-def-100 to-def-200">
<div className="fixed inset-0 z-10 bg-background/10 backdrop-blur-xs" />
- {/* Sidebar Skeleton */}
<div className="fixed top-0 left-0 h-full w-72 border-def-300/50 border-r bg-background/80 backdrop-blur-sm">
- {/* Logo area */}
<div className="flex h-16 items-center border-def-300/50 border-b px-4">
<div className="h-8 w-8 rounded-lg bg-def-300/60" />
<div className="ml-3 h-4 w-24 rounded bg-def-300/60" />
</div>
- {/* Navigation items */}
<div className="space-y-3 p-4">
{[
'Dashboard',
@@ -30,7 +27,6 @@ export function SkeletonDashboard() {
))}
</div>
- {/* Project section */}
<div className="px-4 py-2">
<div className="mb-3 h-3 w-16 rounded bg-def-300/60" />
{['Project Alpha', 'Project Beta', 'Project Gamma'].map(
@@ -47,9 +43,7 @@ export function SkeletonDashboard() {
</div>
</div>
- {/* Main content area skeleton */}
<div className="ml-72 p-8">
- {/* Header area */}
<div className="mb-8">
<div className="mb-4 flex items-center justify-between">
<div className="h-6 w-48 rounded bg-def-300/60" />
@@ -60,7 +54,6 @@ export function SkeletonDashboard() {
</div>
</div>
- {/* Dashboard grid */}
<div className="mb-8 grid grid-cols-3 gap-6">
{[
'Total Users',
@@ -81,7 +74,6 @@ export function SkeletonDashboard() {
))}
</div>
- {/* Chart area */}
<div className="grid grid-cols-2 gap-6">
<div className="h-64 rounded-xl border border-def-300/50 bg-card/60 p-6">
<div className="mb-4 h-4 w-20 rounded bg-def-300/60" />
diff --git a/apps/start/src/components/ui/data-table/data-table.test.tsx b/apps/start/src/components/ui/data-table/data-table.test.tsx
index 60314f42a..655ddfe8b 100644
--- a/apps/start/src/components/ui/data-table/data-table.test.tsx
+++ b/apps/start/src/components/ui/data-table/data-table.test.tsx
@@ -1,8 +1,8 @@
// @vitest-environment jsdom
-// An error and an empty result both produce zero rows, so the table used to
-// render "nothing here yet" for a failed query — a 500 from `profile.list`
-// read as "Looks like you haven't identified any profiles yet" (ISSUES.md H11).
+// An error and an empty result both produce zero rows, so a failed query must
+// not render "nothing here yet" (a 500 from `profile.list` is not "you haven't
+// identified any profiles yet").
import {
type ColumnDef,
diff --git a/apps/start/src/components/ui/data-table/data-table.tsx b/apps/start/src/components/ui/data-table/data-table.tsx
index d68c00d04..fd13fe6bd 100644
--- a/apps/start/src/components/ui/data-table/data-table.tsx
+++ b/apps/start/src/components/ui/data-table/data-table.tsx
@@ -22,7 +22,7 @@ export interface DataTableProps<TData> {
/**
* A failed query, not an empty one. Without this the table renders its
* empty state for both, so a 500 from `profile.list` reads as "you haven't
- * identified any profiles yet" (ISSUES.md H11).
+ * identified any profiles yet".
*/
error?: boolean;
empty?: {
diff --git a/apps/start/src/components/widget-table.tsx b/apps/start/src/components/widget-table.tsx
index d87b370ec..5a78bc3db 100644
--- a/apps/start/src/components/widget-table.tsx
+++ b/apps/start/src/components/widget-table.tsx
@@ -105,10 +105,9 @@ export function WidgetTable<T>({
.join(' ')}`
: '1fr';
- // `useId` is stable across SSR and hydration where `Math.random()` was not:
- // the id lands in a className AND inside injected <style> text, so both the
- // attribute and the stylesheet differed and React regenerated the subtree
- // (ISSUES.md H10). React's ids contain colons, which are not valid in a CSS
+ // `useId` is stable across SSR and hydration, unlike `Math.random()`: the id
+ // lands in a className AND inside injected <style> text, so a mismatch makes
+ // React regenerate the subtree. React's ids contain colons, which are not valid in a CSS
// selector, so they are stripped.
const reactId = React.useId();
const containerId = `widget-table-${reactId.replace(/:/g, '')}`;
@@ -153,7 +152,6 @@ export function WidgetTable<T>({
style={{ containerType: 'inline-size' }}
>
{containerQueryStyles}
- {/* Header */}
<div
className={cn('head grid border-border border-b', columnClassName)}
style={{ gridTemplateColumns }}
@@ -199,7 +197,6 @@ export function WidgetTable<T>({
})}
</div>
- {/* Body */}
<div className="body flex flex-col">
{data.map((item, index) => (
<div
diff --git a/apps/start/src/hooks/use-breakpoint.ts b/apps/start/src/hooks/use-breakpoint.ts
index 8a7cf2ce2..a57aa2e47 100644
--- a/apps/start/src/hooks/use-breakpoint.ts
+++ b/apps/start/src/hooks/use-breakpoint.ts
@@ -1,9 +1,6 @@
import { useMediaQuery } from 'react-responsive';
-// import type { ScreensConfig } from 'tailwindcss/types/config';
-
// TODO: Ensure we have same breakpoints as tailwind
-// const breakpoints = theme?.screens ?? {
const breakpoints = {
xs: '480px',
sm: '640px',
diff --git a/apps/start/src/hooks/use-project-document-title.ts b/apps/start/src/hooks/use-project-document-title.ts
index b73257f82..f30693a65 100644
--- a/apps/start/src/hooks/use-project-document-title.ts
+++ b/apps/start/src/hooks/use-project-document-title.ts
@@ -12,11 +12,8 @@ function inject(title: string, projectName: string): string {
return title.replace(BASE_SUFFIX, ` | ${projectName}${BASE_SUFFIX}`);
}
-// Browser tab titles are set by each route's `head()` (server + client).
-// Rather than threading project name through every route's loader/head,
-// we patch the title imperatively on the client whenever it changes —
-// observed via a MutationObserver on <title>. This keeps the change
-// localized to one hook mounted under the project layout.
+// Route `head()` sets the title; rather than thread the project name through
+// every route, patch <title> on the client via a MutationObserver.
export function useProjectDocumentTitle(projectName: string | undefined) {
const lastApplied = useRef<string | null>(null);
diff --git a/apps/start/src/modals/billing-success.tsx b/apps/start/src/modals/billing-success.tsx
index 1abb5e109..d9c6a6659 100644
--- a/apps/start/src/modals/billing-success.tsx
+++ b/apps/start/src/modals/billing-success.tsx
@@ -14,7 +14,6 @@ export default function BillingSuccess() {
</button>
<div className="flex flex-col items-center justify-center px-8 py-12">
- {/* Success Icon with animated rings */}
<div className="relative mb-10 flex h-64 w-64 items-center justify-center">
<div className="absolute inset-0 flex animate-ping-slow items-center justify-center opacity-10">
<div className="h-64 w-64 rounded-full bg-emerald-400" />
@@ -32,7 +31,6 @@ export default function BillingSuccess() {
</div>
</div>
- {/* Success Message */}
<h2 className="mb-4 font-semibold text-3xl">
Subscription updated successfully
</h2>
diff --git a/apps/start/src/modals/date-time-picker.tsx b/apps/start/src/modals/date-time-picker.tsx
index 00d0cf8fe..7ef6d6b1f 100644
--- a/apps/start/src/modals/date-time-picker.tsx
+++ b/apps/start/src/modals/date-time-picker.tsx
@@ -114,7 +114,6 @@ export default function DateTimePicker({
<ModalHeader title={title} />
<div className="space-y-4">
- {/* Selected Date/Time Display */}
<div className="rounded-lg border border-dashed bg-muted/50 p-4">
<div className="flex items-center justify-center space-x-2 text-sm">
<CalendarIcon className="h-4 w-4 text-muted-foreground" />
@@ -129,7 +128,6 @@ export default function DateTimePicker({
</div>
</div>
- {/* Calendar Section */}
<div className="row h-[333px] gap-2">
<Calendar
className="rounded-lg border [&_table]:mx-auto [&_table]:w-auto"
@@ -167,7 +165,6 @@ export default function DateTimePicker({
</ScrollArea>
</div>
- {/* Action Buttons */}
<div className="flex gap-3 pt-2">
<Button
className="flex-1"
diff --git a/apps/start/src/modals/event-details.tsx b/apps/start/src/modals/event-details.tsx
index 445371cee..255848612 100644
--- a/apps/start/src/modals/event-details.tsx
+++ b/apps/start/src/modals/event-details.tsx
@@ -188,30 +188,6 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {
<div className="row items-center justify-between">
<div className="title">{event.name}</div>
<div className="row items-center gap-2 pr-2">
- {/* <Button
- size="icon"
- variant={'ghost'}
- onClick={() => {
- const event = new KeyboardEvent('keydown', {
- key: 'ArrowLeft',
- });
- dispatchEvent(event);
- }}
- >
- <ArrowLeftIcon className="size-4" />
- </Button>
- <Button
- size="icon"
- variant={'ghost'}
- onClick={() => {
- const event = new KeyboardEvent('keydown', {
- key: 'ArrowRight',
- });
- dispatchEvent(event);
- }}
- >
- <ArrowRightIcon className="size-4" />
- </Button> */}
<Button onClick={() => popModal()} size="icon" variant={'ghost'}>
<XIcon className="size-4" />
</Button>
@@ -402,7 +378,6 @@ function EventDetailsSkeleton() {
</WidgetButtons>
</WidgetHead>
<WidgetBody className="col gap-4 bg-def-100">
- {/* Profile skeleton */}
<div className="card col gap-2 p-4 py-2">
<div className="row items-center justify-between gap-2">
<div className="row min-w-0 items-center gap-2">
@@ -421,7 +396,6 @@ function EventDetailsSkeleton() {
<div className="h-4 w-64 animate-pulse rounded bg-muted" />
</div>
- {/* Properties skeleton */}
<section>
<div className="mb-2 flex justify-between font-medium">
<div className="h-5 w-20 animate-pulse rounded bg-muted" />
@@ -439,7 +413,6 @@ function EventDetailsSkeleton() {
</div>
</section>
- {/* Information skeleton */}
<section>
<div className="mb-2 flex justify-between font-medium">
<div className="h-5 w-24 animate-pulse rounded bg-muted" />
@@ -457,7 +430,6 @@ function EventDetailsSkeleton() {
</div>
</section>
- {/* Chart skeleton */}
<section>
<div className="mb-2 flex justify-between font-medium">
<div className="h-5 w-40 animate-pulse rounded bg-muted" />
diff --git a/apps/start/src/modals/view-chart-users.tsx b/apps/start/src/modals/view-chart-users.tsx
index eb267070b..312403fd1 100644
--- a/apps/start/src/modals/view-chart-users.tsx
+++ b/apps/start/src/modals/view-chart-users.tsx
@@ -149,8 +149,8 @@ function ProfileList({ profiles }: { profiles: any[] }) {
/**
* Renders the query's outcome. A failed request must not look like an empty
- * result — `data ?? []` used to render backend errors as "No users found",
- * which hid real failures (e.g. a funnel breakdown whose SQL didn't compile).
+ * result, or backend errors (e.g. a funnel breakdown whose SQL didn't compile)
+ * would read as "No users found".
*/
function ProfileListState({
query,
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
index 84563b361..5e55de464 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.index.tsx
@@ -67,7 +67,6 @@ function Component() {
return (
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
- {/* Metrics */}
{m && (
<div className="col-span-1 md:col-span-2">
<div className="card grid grid-cols-2 overflow-hidden rounded-md md:grid-cols-4">
@@ -113,7 +112,6 @@ function Component() {
</div>
)}
- {/* Properties */}
<div className="col-span-1 md:col-span-2">
<Widget className="w-full">
<WidgetHead>
@@ -142,22 +140,18 @@ function Component() {
</Widget>
</div>
- {/* Activity heatmap */}
<div className="col-span-1">
<ProfileActivity data={activity.data} />
</div>
- {/* New members last 30 days */}
<div className="col-span-1">
<GroupMemberGrowth data={memberGrowth.data} />
</div>
- {/* Top events */}
<div className="col-span-1">
<MostEvents data={mostEvents.data} />
</div>
- {/* Popular routes */}
<div className="col-span-1">
<PopularRoutes data={popularRoutes.data} />
</div>
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
index 6e272f927..3442f6de0 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.profiles.$profileId._tabs.index.tsx
@@ -97,55 +97,48 @@ function Component() {
);
return (
- <>
- {/* Main content grid */}
- <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
- <div className="col-span-1 md:col-span-2">
- <ProfileMetrics data={metrics.data} />
- </div>
- {/* Profile properties - full width */}
- <div className="col-span-1 flex flex-col gap-3 md:col-span-2">
- <ProfileProperties profile={profile.data!} />
- {profile.data?.groups?.length ? (
- <ProfileGroups
- groups={profile.data.groups}
- profileId={profileId}
- projectId={projectId}
- />
- ) : null}
- </div>
-
- {/* Heatmap / Activity */}
- <div className="col-span-1">
- <ProfileActivity data={activity.data} />
- </div>
-
- {/* Latest events */}
- <div className="col-span-1">
- <LatestEvents
- organizationId={organizationId}
+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
+ <div className="col-span-1 md:col-span-2">
+ <ProfileMetrics data={metrics.data} />
+ </div>
+ {/* Profile properties - full width */}
+ <div className="col-span-1 flex flex-col gap-3 md:col-span-2">
+ <ProfileProperties profile={profile.data!} />
+ {profile.data?.groups?.length ? (
+ <ProfileGroups
+ groups={profile.data.groups}
profileId={profileId}
projectId={projectId}
/>
- </div>
+ ) : null}
+ </div>
- {/* Most events */}
- <div className="col-span-1">
- <MostEvents data={mostEvents.data} />
- </div>
+ <div className="col-span-1">
+ <ProfileActivity data={activity.data} />
+ </div>
- {/* Popular routes */}
- <div className="col-span-1">
- <PopularRoutes data={popularRoutes.data} />
- </div>
+ <div className="col-span-1">
+ <LatestEvents
+ organizationId={organizationId}
+ profileId={profileId}
+ projectId={projectId}
+ />
+ </div>
+
+ <div className="col-span-1">
+ <MostEvents data={mostEvents.data} />
+ </div>
+
+ <div className="col-span-1">
+ <PopularRoutes data={popularRoutes.data} />
+ </div>
- {/* Charts - spans both columns */}
- <div className="col-span-1 md:col-span-2">
- <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
- <ProfileCharts profileId={profileId} projectId={projectId} />
- </div>
+ {/* Charts - spans both columns */}
+ <div className="col-span-1 md:col-span-2">
+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
+ <ProfileCharts profileId={profileId} projectId={projectId} />
</div>
</div>
- </>
+ </div>
);
}
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
index e53f1116b..6f6f147b4 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.references.tsx
@@ -24,9 +24,6 @@ import {
DropdownMenuItem,
DropdownMenuSeparator,
} from '@/components/ui/dropdown-menu';
-// import { Input } from '@/components/ui/input';
-// import { TableButtons } from '@/components/ui/table';
-// import { useSearchQueryState } from '@/hooks/use-search-query-state';
import { useTRPC } from '@/integrations/trpc/react';
import { pushModal, showConfirm } from '@/modals';
import { formatDateTime } from '@/utils/date';
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
index 8ca06d9f2..6ae21c264 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.sessions_.$sessionId.tsx
@@ -236,9 +236,7 @@ function Component() {
)}
<div className="grid grid-cols-1 gap-6 lg:grid-cols-[340px_minmax(0,1fr)]">
- {/* Left column */}
<div className="col gap-6">
- {/* Session info */}
<Widget className="w-full">
<WidgetHead>
<WidgetTitle>Session info</WidgetTitle>
@@ -321,7 +319,6 @@ function Component() {
/>
</Widget>
- {/* Profile card */}
{isIdentified && profile && (
<Widget className="w-full">
<WidgetHead>
@@ -353,7 +350,6 @@ function Component() {
</Widget>
)}
- {/* Group cards */}
{sessionGroups && sessionGroups.length > 0 && (
<Widget className="w-full">
<WidgetHead>
@@ -382,20 +378,16 @@ function Component() {
</Widget>
)}
- {/* Visited pages */}
<VisitedRoutes
paths={events
.filter((e) => e.name === 'screen_view' && e.path)
.map((e) => e.path)}
/>
- {/* Event distribution */}
<EventDistribution events={events} />
</div>
- {/* Right column */}
<div className="col gap-6">
- {/* Events list */}
<Widget className="w-full">
<WidgetHead>
<WidgetTitle>Events</WidgetTitle>
diff --git a/apps/start/src/routes/_steps.onboarding.project.tsx b/apps/start/src/routes/_steps.onboarding.project.tsx
index d90cd300e..bc0c5360f 100644
--- a/apps/start/src/routes/_steps.onboarding.project.tsx
+++ b/apps/start/src/routes/_steps.onboarding.project.tsx
@@ -211,21 +211,6 @@ function Component() {
</WithLabel>
)}
/>
- {/* {organizations.length > 0 && (
- <button
- className="-mt-2 self-start text-left text-muted-foreground text-sm hover:text-foreground"
- onClick={() => {
- form.setValue('organization', '', {
- shouldValidate: false,
- });
- form.clearErrors(['organization', 'organizationId']);
- setCreateNewOrg(false);
- }}
- type="button"
- >
- ← Use existing workspace
- </button>
- )} */}
</>
) : (
<div className="col-span-2">
@@ -255,19 +240,6 @@ function Component() {
);
}}
/>
- {/* <button
- className="mt-2 text-muted-foreground text-sm hover:text-foreground"
- onClick={() => {
- form.setValue('organizationId', undefined, {
- shouldValidate: false,
- });
- form.clearErrors(['organization', 'organizationId']);
- setCreateNewOrg(true);
- }}
- type="button"
- >
- + Create new workspace
- </button> */}
</div>
)}
<InputWithLabel
diff --git a/apps/start/src/routes/unsubscribe.tsx b/apps/start/src/routes/unsubscribe.tsx
index d8aa55b3e..a56687b84 100644
--- a/apps/start/src/routes/unsubscribe.tsx
+++ b/apps/start/src/routes/unsubscribe.tsx
@@ -19,8 +19,7 @@ export const Route = createFileRoute('/unsubscribe')({
component: RouteComponent,
validateSearch: unsubscribeSearchSchema,
pendingComponent: FullPageLoadingState,
- // An unsubscribe link with a missing or malformed parameter used to render
- // the raw ZodError issues array at the recipient.
+ // A missing or malformed parameter would otherwise show the raw ZodError.
errorComponent: () => (
<FullPageEmptyState
description="This unsubscribe link is missing information or has expired. Open the link from your email again, or change your preferences from your account settings."
diff --git a/apps/start/src/routes/widget/badge.tsx b/apps/start/src/routes/widget/badge.tsx
index 0ddae2734..66d0093e9 100644
--- a/apps/start/src/routes/widget/badge.tsx
+++ b/apps/start/src/routes/widget/badge.tsx
@@ -59,12 +59,10 @@ function BadgeWidget({ visitors, isLoading, color }: BadgeWidgetProps) {
backgroundColor: color,
}}
>
- {/* Logo on the left */}
<div className="flex-shrink-0">
<LogoSquare className="h-8 w-8" />
</div>
- {/* Center text */}
<div className="-mt-px flex min-w-0 flex-1 flex-col items-start gap-0.5">
<div className="font-medium text-[10px] text-white/80 uppercase tracking-wide">
ANALYTICS FROM
@@ -72,7 +70,6 @@ function BadgeWidget({ visitors, isLoading, color }: BadgeWidgetProps) {
<div className="font-semibold text-white leading-tight">OpenPanel</div>
</div>
- {/* Visitor count on the right */}
<div className="col center-center flex-shrink-0 gap-1">
<UsersIcon className="size-4 text-white" />
<div className="font-medium text-sm text-white tabular-nums">
diff --git a/apps/start/src/routes/widget/realtime.tsx b/apps/start/src/routes/widget/realtime.tsx
index 35cc32590..e101db965 100644
--- a/apps/start/src/routes/widget/realtime.tsx
+++ b/apps/start/src/routes/widget/realtime.tsx
@@ -129,7 +129,6 @@ function RealtimeWidget({ shareId, data, limit, color }: RealtimeWidgetProps) {
return (
<div className="flex h-screen w-full flex-col bg-background text-foreground">
- {/* Header with live counter */}
<div className="p-6 pb-3">
<div className="flex h-4 w-full items-center justify-between">
<div className="flex w-full items-center gap-3">
@@ -187,7 +186,6 @@ function RealtimeWidget({ shareId, data, limit, color }: RealtimeWidgetProps) {
data.paths.length > 0) && (
<div className="hide-scrollbar flex flex-1 flex-col gap-6 overflow-auto border-t p-6">
<div className={cn('grid grid-cols-1 gap-6', grids)}>
- {/* Countries */}
{data.countries.length > 0 && (
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
@@ -232,7 +230,6 @@ function RealtimeWidget({ shareId, data, limit, color }: RealtimeWidgetProps) {
</div>
)}
- {/* Referrers */}
{data.referrers.length > 0 && (
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
@@ -271,7 +268,6 @@ function RealtimeWidget({ shareId, data, limit, color }: RealtimeWidgetProps) {
</div>
)}
- {/* Paths */}
{data.paths.length > 0 && (
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
@@ -449,7 +445,6 @@ function RealtimeWidgetSkeleton({ limit }: { limit: number }) {
return (
<div className="flex h-screen w-full animate-pulse flex-col bg-background text-foreground">
- {/* Header with live counter */}
<div className="border-b p-6 pb-3">
<div className="flex h-4 w-full items-center justify-between">
<div className="flex w-full items-center gap-3">
@@ -486,9 +481,7 @@ function RealtimeWidgetSkeleton({ limit }: { limit: number }) {
</div>
<div className="hide-scrollbar flex flex-1 flex-col gap-6 overflow-auto p-6">
- {/* Countries, Referrers, and Paths skeleton */}
<div className="grid grid-cols-1 gap-6 md:grid-cols-3">
- {/* Countries skeleton */}
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
COUNTRY
@@ -500,7 +493,6 @@ function RealtimeWidgetSkeleton({ limit }: { limit: number }) {
</div>
</div>
- {/* Referrers skeleton */}
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
REFERRER
@@ -512,7 +504,6 @@ function RealtimeWidgetSkeleton({ limit }: { limit: number }) {
</div>
</div>
- {/* Paths skeleton */}
<div className="flex flex-col">
<div className="mb-3 font-medium text-muted-foreground text-xs">
PATH
diff --git a/apps/start/src/utils/date.ts b/apps/start/src/utils/date.ts
index c5011e940..92fa0a41e 100644
--- a/apps/start/src/utils/date.ts
+++ b/apps/start/src/utils/date.ts
@@ -9,14 +9,10 @@ export function dateDifferanceInDays(date1: Date, date2: Date) {
}
/**
- * Pinned, deliberately. This used to return `navigator.language` and fall back
- * to `en-US` only when `navigator` was undefined — which is dead code on
- * modern runtimes, since node defines `navigator` too. The server therefore
- * formatted with the MACHINE locale while the browser used the visitor's, so
- * the two renders disagreed and React discarded the tree: `21:35:55` against
- * `9:35:55 PM`, and Swedish month names in an English UI (ISSUES.md H10).
- *
- * Numbers were already pinned this way in `use-numer-formatter.ts`.
+ * Pinned, deliberately. `navigator.language` differs between the server (the
+ * MACHINE locale, since node defines `navigator` too) and the browser, so the
+ * two renders disagreed and React discarded the tree: `21:35:55` against
+ * `9:35:55 PM`, and Swedish month names in an English UI.
*
* Note this pins the LOCALE, not the timezone: a server in a different zone
* from the visitor still renders different clock times. That is a separate
diff --git a/apps/start/src/utils/object-to-zod-enums.ts b/apps/start/src/utils/object-to-zod-enums.ts
index 7e1fada50..6ffdb4fe3 100644
--- a/apps/start/src/utils/object-to-zod-enums.ts
+++ b/apps/start/src/utils/object-to-zod-enums.ts
@@ -1,6 +1,4 @@
-// Helper, not vocabulary: `objectToZodEnums` has no owning module, so it is
-// copied here rather than value-imported from @openpanel/core (same
-// treatment the `common` math helpers get).
+// Copied rather than value-imported from @openpanel/core.
export function objectToZodEnums<K extends string>(
obj: Record<K, unknown>
): [K, ...K[]] {
diff --git a/apps/start/src/utils/previous-metric.ts b/apps/start/src/utils/previous-metric.ts
index db3085345..0e340855f 100644
--- a/apps/start/src/utils/previous-metric.ts
+++ b/apps/start/src/utils/previous-metric.ts
@@ -1,11 +1,6 @@
-// The dashboard's copy of
-// packages/core/src/modules/report/src/previous-metric.ts.
-//
-// The six generic aggregates and `shortId` that used to sit beside it live in
-// @openpanel/shared, which the dashboard imports directly. This one function
-// stays duplicated: it returns `PreviousValue`, report vocabulary that stays
-// out of @openpanel/shared, and apps/start cannot value-import core outside a
-// `*.constants.ts` path. The type is safe to import — it is erased.
+// Copy of packages/core/src/modules/report/src/previous-metric.ts: apps/start
+// cannot value-import core outside a `*.constants.ts` path, and `PreviousValue`
+// stays out of @openpanel/shared. The type import is erased.
import type { PreviousValue } from '@openpanel/core/modules/report/report.constants';
import { round } from '@openpanel/shared';
import { isNil } from 'ramda';
diff --git a/apps/start/src/utils/theme.ts b/apps/start/src/utils/theme.ts
index 38b3fe228..6fa63448b 100644
--- a/apps/start/src/utils/theme.ts
+++ b/apps/start/src/utils/theme.ts
@@ -1,13 +1,5 @@
-// import resolveConfig from 'tailwindcss/resolveConfig';
-
import { chartColors } from '@openpanel/core/modules/report/report.constants';
-// import tailwinConfig from '../../tailwind.config';
-
-// export const resolvedTailwindConfig = resolveConfig(tailwinConfig);
-
-// export const theme = resolvedTailwindConfig.theme as Record<string, any>;
-
export function getChartColor(index: number): string {
return chartColors[index % chartColors.length]?.main || chartColors[0].main;
}