Skip to content

Extract reusable warning banner and link planning hints - #140

Merged
Gamius00 merged 8 commits into
release-v-1.0.3from
codex/add-reusable-warning-link
Jun 26, 2026
Merged

Extract reusable warning banner and link planning hints#140
Gamius00 merged 8 commits into
release-v-1.0.3from
codex/add-reusable-warning-link

Conversation

@FleetAdmiralJakob

@FleetAdmiralJakob FleetAdmiralJakob commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

What changed

Dayova now turns passive learning-plan warnings into actionable guidance. When a generated plan reports missing or constrained Lernzeiten, the planning hint uses the shared warning banner and can send the user directly to the Lernzeiten screen while preserving a return path back to the plan.

Why

Before this PR, users could be told that no usable learning times were configured, but the warning itself did not give them a way to fix it. This makes the recovery path obvious and reuses the same warning/CTA component already needed by the notifications inbox.

Summary

  • Extracted a shared WarningBanner component for warning + CTA messaging.
  • Polished the shared banner spacing, icon treatment, and CTA styling so the learning-plan warning reads cleanly.
  • Replaced duplicate learning-plan planning-hint UI with PlanningHintBanner.
  • Added a learningTimes route constant plus returnTo helpers so the Lernzeiten overview/editor can keep the user in the learning-plan flow.
  • Updated notifications to use the shared banner with explicit title and description props.
  • Reconciled the branch with the Align design system badge subtleties with Figma #145 design-system token cleanup.

Screenshots

Captured on the iOS simulator, iPhone 17 Pro.

Learning-plan warning placement

learning-plans/[planId]/review.tsx learning-plans/[planId]/index.tsx
Learning plan review screen showing the warning banner above generated sessions Learning plan detail screen showing the warning banner above accepted sessions

Related warning and Lernzeiten flow

Shared warning banner Lernzeiten destination Lernzeit editor
Notifications screen showing the shared warning banner with CTA Lernzeiten overview opened from the CTA flow Lernzeit editor reached from the Lernzeiten overview

Testing

  • fnm exec --using=v22.23.0 ./node_modules/.bin/biome format .
  • fnm exec --using=v22.23.0 ./node_modules/.bin/biome lint . --only=nursery/useSortedClasses
  • fnm exec --using=v22.23.0 ./node_modules/.bin/tsc --noEmit
  • fnm exec --using=v22.23.0 ./node_modules/.bin/eslint src convex index.ts

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1bd8dfa9-a40c-448c-b374-b73a25c0eb1c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-reusable-warning-link

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfea75d3bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

};

const openLearningTimes = () => {
router.push(ROUTES.learningTimes);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the learning-times CTA in the plan flow

When this CTA is tapped from the generated-plan review, it pushes /learning-times; I checked src/app/learning-times/index.tsx and its header back handler routes to /settings whenever router.canGoBack() is true, so users who follow the planning hint to adjust learning times cannot return to the draft plan via the normal back control and can get dropped into the settings stack instead. Preserve a return target for this new entry point or make the learning-times back path return to the originating plan screen.

Useful? React with 👍 / 👎.

@Gamius00
Gamius00 changed the base branch from main to realease-v-1.0.3 June 23, 2026 09:03
@Gamius00

Copy link
Copy Markdown
Member

Please add Screenshots next time

@Gamius00

Copy link
Copy Markdown
Member

Please solve merge conflicts

@Gamius00 Gamius00 assigned Gamius00 and unassigned Gamius00 Jun 24, 2026
@Gamius00
Gamius00 self-requested a review June 24, 2026 06:18

@Gamius00 Gamius00 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Merge Conflicts, Add Screenshots to PR

@FleetAdmiralJakob

Copy link
Copy Markdown
Collaborator Author

Fixed and pushed PR #140 merge conflicts.

Commit pushed: 76e869a Merge release-v-1.0.3 into warning link branch
Branch is clean and synced with origin/codex/add-reusable-warning-link.

Conflicts

  1. notifications.tsx
    PR branch extracted the warning UI into shared WarningBanner; release-v-1.0.3 still had a local WarningBanner updated with new design tokens.
    Resolution: kept the shared component usage and removed the local duplicate.

  2. review.tsx
    PR branch used PlanningHintBanner; release branch replaced the inline warning with new design-token styling.
    Resolution: kept release styling changes elsewhere, kept PlanningHintBanner, and preserved the returnTo Lernzeiten CTA flow.

  3. index.tsx
    PR branch used the reusable planning hint banner; release branch changed imports and session UI to the updated button/design-system pattern, while still using an inline warning.
    Resolution: kept release’s updated session UI and design-system imports, but used the reusable PlanningHintBanner.

Also updated warning-banner.tsx to use the release design tokens/classes, and preserved the learning-times returnTo plumbing.

Validation passed:
pnpm typecheck
pnpm lint

@FleetAdmiralJakob

Copy link
Copy Markdown
Collaborator Author

Please only merge after merging #145

Jakob Rössner added 6 commits June 26, 2026 14:36
…reusable-warning-link

# Conflicts:
#	src/app/learning-plans/[planId]/index.tsx
#	src/app/learning-plans/[planId]/review.tsx
#	src/app/notifications.tsx
them locally we can do that via a .tmp folder or something and for
everything else they are already saved inside the PR. No need to have
them twice (duplicated). Agents should upload them directly via their
plugins etc.
@FleetAdmiralJakob

Copy link
Copy Markdown
Collaborator Author

Please only merge after merging: #147

@Gamius00
Gamius00 merged commit ea5b857 into release-v-1.0.3 Jun 26, 2026
1 check passed
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