Skip to content

Release v 1.0.3#151

Merged
Gamius00 merged 113 commits into
mainfrom
release-v-1.0.3
Jul 9, 2026
Merged

Release v 1.0.3#151
Gamius00 merged 113 commits into
mainfrom
release-v-1.0.3

Conversation

@FleetAdmiralJakob

@FleetAdmiralJakob FleetAdmiralJakob commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Open work:

-[ ] Release versioning system: Complete new build if there's a new tag on GitHub

Done, not tested work:

-[ ] New learning system (#133, #131, #132, #141, #150)
-[ ] Analytics system (#144, #76, #77, #78, #79, #80, #81, #82, #83, #84)
-[ ] Fix of #128 (#143)
-[ ] New onboarding (#82, #153)

Tested work:
-[x] New design system (#147, #145, #127)
-[x] Flower fix (#139)

Nothing yet

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a tabbed Learning Plans overview (learning plans + homework) with an exam/homework create-type picker.
    • Introduced an interactive learning-session flow with step progression, results/analysis, and optional voice transcription.
    • Added reusable bottom-sheet/modal and warning banner components.
  • Improvements

    • Refreshed the app’s UI using unified semantic design tokens and updated typography (light-mode focus; dark mode still not wired).
    • Improved “return to” navigation and refreshed timelines/cards across key screens.
  • Bug Fixes

    • Homework overview now filters homework-only and preserves schedule order.
    • Learning plan removal properly cleans up synced and related data.
  • Tests

    • Added/expanded coverage for homework overview, learning-session generation/finishing, and planning hint behavior.

FleetAdmiralJakob and others added 30 commits May 26, 2026 01:13
…ystem

# Conflicts:
#	src/app/learning-plans/new.tsx
#	src/components/bottom-nav.tsx
Refresh the app design system across core screens
@FleetAdmiralJakob

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
src/app/(app)/home.tsx (1)

425-444: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Sync dayKey into selectedDayKey on mount. HomeScreen still initializes from today, so /home?dayKey=... lands on the wrong day unless the search param is applied in src/app/(app)/home.tsx.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`(app)/home.tsx around lines 425 - 444, HomeScreen is still
initializing selectedDayKey from today instead of the incoming dayKey query, so
deep links can open the wrong day. Update the HomeScreen state setup and its
mount-time effect logic in the selectedDayKey flow to read the route/search
param and sync it immediately, using the existing getDayKey, useCurrentLocalDay,
and setSelectedDayKey logic in HomeScreen.
🧹 Nitpick comments (1)
src/app/learning-plans/[planId]/success.tsx (1)

1-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract shared success-screen logic to remove duplication.

This file is nearly identical to src/app/entry/success.tsx (same Stack.Screen/StatusBar setup, same finish() redirect pattern, same useMemo shape around buildDateTimeLabel). Consider extracting a small shared hook (e.g. useFinishRedirect(dayKey)) or a wrapper component that takes title/detailLabel/date-time params, to avoid maintaining two copies of this navigation/formatting logic.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/learning-plans/`[planId]/success.tsx around lines 1 - 43, This
success screen duplicates the same navigation and date-label setup used in the
entry success screen, so extract the shared logic into a reusable hook or
wrapper component. Move the common `useMemo`/`buildDateTimeLabel` handling and
the `finish()` redirect pattern from `LearningPlanSuccessScreen` into a shared
helper (for example a `useFinishRedirect` hook or generic success-screen
wrapper), then pass only the screen-specific `title`, `detailLabel`, and params
into each screen.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@convex/learningPlanAi.ts`:
- Around line 1430-1447: The multiple-choice mapping in learningPlanAi.ts can
persist a guessed correct answer when no choice is marked isCorrect, which later
breaks grading in submitAnswer. Update the logic in the multipleChoice branch to
validate that exactly one choice has isCorrect before building the returned
item, and if none is found, throw so withGeneratedTextRetry regenerates instead
of defaulting correctChoiceId to the first option. Use the existing item.choices
mapping and correctChoice lookup to locate the fix.

In `@src/app/`(app)/home.tsx:
- Around line 390-395: The fallback in getLearningCardSummary is hardcoded
placeholder copy and should be replaced with a generic user-facing message.
Update the final return path in getLearningCardSummary so that when a DayEntry
has no notes and no kind, it uses neutral fallback text consistent with the
other branches rather than the math-equation sentence, keeping the logic around
formatGermanUiText, entry.notes, and entry.kind unchanged.

---

Outside diff comments:
In `@src/app/`(app)/home.tsx:
- Around line 425-444: HomeScreen is still initializing selectedDayKey from
today instead of the incoming dayKey query, so deep links can open the wrong
day. Update the HomeScreen state setup and its mount-time effect logic in the
selectedDayKey flow to read the route/search param and sync it immediately,
using the existing getDayKey, useCurrentLocalDay, and setSelectedDayKey logic in
HomeScreen.

---

Nitpick comments:
In `@src/app/learning-plans/`[planId]/success.tsx:
- Around line 1-43: This success screen duplicates the same navigation and
date-label setup used in the entry success screen, so extract the shared logic
into a reusable hook or wrapper component. Move the common
`useMemo`/`buildDateTimeLabel` handling and the `finish()` redirect pattern from
`LearningPlanSuccessScreen` into a shared helper (for example a
`useFinishRedirect` hook or generic success-screen wrapper), then pass only the
screen-specific `title`, `detailLabel`, and params into each screen.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5736748c-203b-4c30-aa4c-6daedee4b1b4

📥 Commits

Reviewing files that changed from the base of the PR and between ce88703 and 356ff42.

⛔ Files ignored due to path filters (8)
  • assets/onboarding/dayova-y.png is excluded by !**/*.png
  • assets/onboarding/intro-path.svg is excluded by !**/*.svg
  • assets/onboarding/intro-tasks.svg is excluded by !**/*.svg
  • assets/onboarding/intro-upload.svg is excluded by !**/*.svg
  • convex/_generated/ai/ai-files.state.json is excluded by !**/_generated/**
  • convex/_generated/ai/guidelines.md is excluded by !**/_generated/**
  • convex/_generated/api.d.ts is excluded by !**/_generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (50)
  • convex/learningPlanAi.ts
  • convex/learningPlanAiScheduling.test.ts
  • convex/learningPlanPlanningHints.ts
  • convex/learningPlans.test.ts
  • convex/learningPlans.ts
  • convex/learningSessionContent.test.ts
  • convex/learningSessionContent.ts
  • convex/learningTimes.test.ts
  • convex/learningTimes.ts
  • convex/users.ts
  • docs/contexts/auth/CONTEXT.md
  • docs/contexts/product/CONTEXT.md
  • metro.config.js
  • package.json
  • src/app/(app)/home.tsx
  • src/app/(app)/learning-plans.tsx
  • src/app/(auth)/index.tsx
  • src/app/(auth)/login.tsx
  • src/app/(auth)/onboarding.tsx
  • src/app/(auth)/register.tsx
  • src/app/_layout.tsx
  • src/app/entry/new.tsx
  • src/app/entry/success.tsx
  • src/app/learning-plans/[planId]/index.tsx
  • src/app/learning-plans/[planId]/review.tsx
  • src/app/learning-plans/[planId]/sessions/[sessionId]/index.tsx
  • src/app/learning-plans/[planId]/success.tsx
  • src/app/learning-plans/new.tsx
  • src/app/learning-times/edit.tsx
  • src/app/learning-times/index.tsx
  • src/components/onboarding/onboarding-flow.test.ts
  • src/components/onboarding/onboarding-flow.ts
  • src/components/onboarding/onboarding-ui.tsx
  • src/components/ui/date-time-picker-sheet.tsx
  • src/components/ui/icon.tsx
  • src/components/ui/notched-action-card.tsx
  • src/components/ui/success-confirmation-screen.tsx
  • src/context/AuthContext.tsx
  • src/context/OnboardingContext.tsx
  • src/features/auth/dayova-auth-flow.tsx
  • src/features/learning-plans/learning-plan-ui.tsx
  • src/features/learning-plans/replan-recovery.test.ts
  • src/features/learning-plans/replan-recovery.ts
  • src/features/learning-plans/theory-card-queue.test.ts
  • src/features/learning-plans/theory-card-queue.ts
  • src/lib/date-time-label.ts
  • src/lib/navigation-actions.test.ts
  • src/lib/navigation-actions.ts
  • src/lib/navigation.ts
  • src/types/svg.d.ts
✅ Files skipped from review due to trivial changes (3)
  • src/app/(auth)/login.tsx
  • convex/learningPlanPlanningHints.ts
  • docs/contexts/auth/CONTEXT.md
🚧 Files skipped from review as they are similar to previous changes (8)
  • docs/contexts/product/CONTEXT.md
  • src/app/_layout.tsx
  • src/components/ui/notched-action-card.tsx
  • src/app/learning-plans/new.tsx
  • src/app/learning-plans/[planId]/index.tsx
  • src/app/learning-plans/[planId]/sessions/[sessionId]/index.tsx
  • src/app/(app)/learning-plans.tsx
  • src/app/learning-times/index.tsx

Comment thread convex/learningPlanAi.ts
Comment on lines +1430 to +1447
if (item.kind === "multipleChoice") {
const choices = item.choices.map((choice, choiceIndex) => ({
id: `choice-${choiceIndex + 1}`,
text: normalizeAiGeneratedGermanText(choice.text),
isCorrect: choice.isCorrect,
}));
const correctChoice = choices.find((choice) => choice.isCorrect);

return {
kind: "multipleChoice" as const,
title: title || `Aufgabe ${index + 1}`,
prompt,
explanation,
idealAnswer,
choices: choices.map(({ id, text }) => ({ id, text })),
correctChoiceId: correctChoice?.id ?? choices[0]?.id ?? "choice-1",
evaluationKeywords,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Multiple-choice items with no AI-marked correct option get an arbitrary "correct" answer.

When the model returns a multipleChoice item where no choice has isCorrect: true, correctChoiceId silently defaults to the first choice. Downstream submitAnswer grades multiple-choice by exact selectedChoiceId match, so a student picking the actually-right option would be marked wrong. Consider throwing inside the retry callback so withGeneratedTextRetry regenerates, rather than persisting a guessed correct answer.

🐛 Proposed guard
 		if (item.kind === "multipleChoice") {
 			const choices = item.choices.map((choice, choiceIndex) => ({
 				id: `choice-${choiceIndex + 1}`,
 				text: normalizeAiGeneratedGermanText(choice.text),
 				isCorrect: choice.isCorrect,
 			}));
 			const correctChoice = choices.find((choice) => choice.isCorrect);
+			if (!correctChoice) {
+				throw new Error(
+					"Multiple-choice task has no correct choice.",
+				);
+			}
 
 			return {
 				kind: "multipleChoice" as const,
 				title: title || `Aufgabe ${index + 1}`,
 				prompt,
 				explanation,
 				idealAnswer,
 				choices: choices.map(({ id, text }) => ({ id, text })),
-				correctChoiceId: correctChoice?.id ?? choices[0]?.id ?? "choice-1",
+				correctChoiceId: correctChoice.id,
 				evaluationKeywords,
 			};
 		}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (item.kind === "multipleChoice") {
const choices = item.choices.map((choice, choiceIndex) => ({
id: `choice-${choiceIndex + 1}`,
text: normalizeAiGeneratedGermanText(choice.text),
isCorrect: choice.isCorrect,
}));
const correctChoice = choices.find((choice) => choice.isCorrect);
return {
kind: "multipleChoice" as const,
title: title || `Aufgabe ${index + 1}`,
prompt,
explanation,
idealAnswer,
choices: choices.map(({ id, text }) => ({ id, text })),
correctChoiceId: correctChoice?.id ?? choices[0]?.id ?? "choice-1",
evaluationKeywords,
};
if (item.kind === "multipleChoice") {
const choices = item.choices.map((choice, choiceIndex) => ({
id: `choice-${choiceIndex + 1}`,
text: normalizeAiGeneratedGermanText(choice.text),
isCorrect: choice.isCorrect,
}));
const correctChoice = choices.find((choice) => choice.isCorrect);
if (!correctChoice) {
throw new Error(
"Multiple-choice task has no correct choice.",
);
}
return {
kind: "multipleChoice" as const,
title: title || `Aufgabe ${index + 1}`,
prompt,
explanation,
idealAnswer,
choices: choices.map(({ id, text }) => ({ id, text })),
correctChoiceId: correctChoice.id,
evaluationKeywords,
};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@convex/learningPlanAi.ts` around lines 1430 - 1447, The multiple-choice
mapping in learningPlanAi.ts can persist a guessed correct answer when no choice
is marked isCorrect, which later breaks grading in submitAnswer. Update the
logic in the multipleChoice branch to validate that exactly one choice has
isCorrect before building the returned item, and if none is found, throw so
withGeneratedTextRetry regenerates instead of defaulting correctChoiceId to the
first option. Use the existing item.choices mapping and correctChoice lookup to
locate the fix.

Comment thread src/app/(app)/home.tsx
Comment on lines +390 to +395
const getLearningCardSummary = (entry: DayEntry | null) => {
if (!entry) return "Keine offenen Aufgaben oder Lernblöcke für heute.";
if (entry.notes?.trim()) return formatGermanUiText(entry.notes.trim());
if (entry.kind?.trim()) return formatGermanUiText(entry.kind.trim());
return "Sicheres Auflösen komplexerer Gleichungen mit Klammern und Variablen auf beiden Seiten.";
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Suspicious hardcoded fallback text in getLearningCardSummary.

When an entry exists but has no notes and no kind, the function falls back to a very specific, unrelated sentence about solving math equations with brackets/variables. This reads like leftover placeholder/mock copy rather than an intentional generic fallback, and will be shown to real users for any entry lacking notes/kind (e.g., freshly created exam entries without notes).

🐛 Proposed fix
 const getLearningCardSummary = (entry: DayEntry | null) => {
 	if (!entry) return "Keine offenen Aufgaben oder Lernblöcke für heute.";
 	if (entry.notes?.trim()) return formatGermanUiText(entry.notes.trim());
 	if (entry.kind?.trim()) return formatGermanUiText(entry.kind.trim());
-	return "Sicheres Auflösen komplexerer Gleichungen mit Klammern und Variablen auf beiden Seiten.";
+	return "Keine weiteren Details vorhanden.";
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const getLearningCardSummary = (entry: DayEntry | null) => {
if (!entry) return "Keine offenen Aufgaben oder Lernblöcke für heute.";
if (entry.notes?.trim()) return formatGermanUiText(entry.notes.trim());
if (entry.kind?.trim()) return formatGermanUiText(entry.kind.trim());
return "Sicheres Auflösen komplexerer Gleichungen mit Klammern und Variablen auf beiden Seiten.";
};
const getLearningCardSummary = (entry: DayEntry | null) => {
if (!entry) return "Keine offenen Aufgaben oder Lernblöcke für heute.";
if (entry.notes?.trim()) return formatGermanUiText(entry.notes.trim());
if (entry.kind?.trim()) return formatGermanUiText(entry.kind.trim());
return "Keine weiteren Details vorhanden.";
};
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`(app)/home.tsx around lines 390 - 395, The fallback in
getLearningCardSummary is hardcoded placeholder copy and should be replaced with
a generic user-facing message. Update the final return path in
getLearningCardSummary so that when a DayEntry has no notes and no kind, it uses
neutral fallback text consistent with the other branches rather than the
math-equation sentence, keeping the logic around formatGermanUiText,
entry.notes, and entry.kind unchanged.

# Conflicts:
#	app.json
#	docs/contexts/product/CONTEXT.md
#	package.json
#	pnpm-lock.yaml
#	src/app/_layout.tsx
#	src/app/entry/new.tsx
#	src/app/learning-plans/new.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/learning-plans/`[planId]/generating.tsx:
- Around line 87-92: The analytics call inside the promise `.then()` chain in
`generating.tsx` should be isolated from the plan-generation success flow so a
`capture("study_plan_generated", ...)` failure does not trigger the outer
`.catch()`. Update the `then((result) => ...)` block to wrap `capture` in its
own try-catch, keeping the successful generation path separate from error
handling. Use the existing `capture` call and the surrounding promise chain in
the generation logic to locate the fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c3e836d4-716b-4a9c-a72f-7615276ed4b1

📥 Commits

Reviewing files that changed from the base of the PR and between 356ff42 and 826fd2e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .env.example
  • convex/schema.ts
  • convex/users.ts
  • docs/contexts/integrations/CONTEXT.md
  • docs/contexts/platform/CONTEXT.md
  • docs/contexts/product/CONTEXT.md
  • package.json
  • src/app/_layout.tsx
  • src/app/entry/new.tsx
  • src/app/learning-plans/[planId]/generating.tsx
  • src/app/learning-plans/new.tsx
  • src/components/analytics-identity.tsx
  • src/context/AuthContext.tsx
  • src/lib/analytics.ts
  • src/lib/runtime-config.ts
✅ Files skipped from review due to trivial changes (3)
  • docs/contexts/platform/CONTEXT.md
  • package.json
  • docs/contexts/integrations/CONTEXT.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • convex/schema.ts
  • src/app/_layout.tsx
  • src/context/AuthContext.tsx
  • src/app/learning-plans/new.tsx
  • src/app/entry/new.tsx

Comment on lines +87 to +92
.then((result) => {
capture("study_plan_generated", {
learning_plan_id: planId,
session_count: result.sessionCount,
});
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Isolate analytics capture from the error-handling chain.

If capture throws, the error propagates to .catch(), which sets errorMessage to "Der Lernplan konnte nicht erstellt werden." even though the plan was generated successfully. This also resets didStartRef, allowing an unnecessary retry. Wrap the capture call in a try-catch to prevent analytics errors from affecting the user-facing flow.

🛡️ Proposed fix
 			.then((result) => {
+				try {
 					capture("study_plan_generated", {
 						learning_plan_id: planId,
 						session_count: result.sessionCount,
 					});
+				} catch {
+					// Analytics errors must not affect the generation flow
+				}
 			})
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.then((result) => {
capture("study_plan_generated", {
learning_plan_id: planId,
session_count: result.sessionCount,
});
})
.then((result) => {
try {
capture("study_plan_generated", {
learning_plan_id: planId,
session_count: result.sessionCount,
});
} catch {
// Analytics errors must not affect the generation flow
}
})
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/learning-plans/`[planId]/generating.tsx around lines 87 - 92, The
analytics call inside the promise `.then()` chain in `generating.tsx` should be
isolated from the plan-generation success flow so a
`capture("study_plan_generated", ...)` failure does not trigger the outer
`.catch()`. Update the `then((result) => ...)` block to wrap `capture` in its
own try-catch, keeping the successful generation path separate from error
handling. Use the existing `capture` call and the surrounding promise chain in
the generation logic to locate the fix.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/app/`(app)/home.tsx:
- Around line 508-510: The dashboard loaded check in home.tsx is too permissive
because Object.values(entriesByDayResults).every(...) returns true for an empty
object, which can fire dashboard_viewed before auth or data are ready. Update
the isDashboardDataLoaded logic in the relevant effect to require both user and
isConvexAuthenticated, and also ensure entriesByDayResults contains a non-empty
set of resolved results before treating the dashboard as loaded. Use the
existing home.tsx effect and isDashboardDataLoaded symbol to locate and tighten
this gate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 72df2896-8b68-4cd3-902a-3c191ba0a765

📥 Commits

Reviewing files that changed from the base of the PR and between 826fd2e and aba2585.

📒 Files selected for processing (2)
  • src/app/(app)/home.tsx
  • src/lib/analytics.ts

Comment thread src/app/(app)/home.tsx
Comment on lines +508 to 510
const isDashboardDataLoaded = Object.values(entriesByDayResults).every(
(result) => result !== undefined,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '480,660p' src/app/'(app)'/home.tsx

Repository: Dayova/dayova-mvp

Length of output: 6085


Gate dashboard_viewed on auth and non-empty query results
Object.values(entriesByDayResults).every(...) is true for {}, so the effect can emit dashboard_viewed with 0 entries before Convex auth resolves and then never emit again. Require user && isConvexAuthenticated and a non-empty result set before marking the dashboard loaded.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`(app)/home.tsx around lines 508 - 510, The dashboard loaded check in
home.tsx is too permissive because Object.values(entriesByDayResults).every(...)
returns true for an empty object, which can fire dashboard_viewed before auth or
data are ready. Update the isDashboardDataLoaded logic in the relevant effect to
require both user and isConvexAuthenticated, and also ensure entriesByDayResults
contains a non-empty set of resolved results before treating the dashboard as
loaded. Use the existing home.tsx effect and isDashboardDataLoaded symbol to
locate and tighten this gate.

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