feat(examples): add flashcard-app example with flip interaction and keyboard navigation#1756
feat(examples): add flashcard-app example with flip interaction and keyboard navigation#1756pranvxag wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a new ChangesFlashcard App Example
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
examples/flashcard-app/tsconfig.json (1)
2-7: 🧹 Nitpick | 🔵 TrivialStrict mode is already enforced through inheritance; consider making it explicit locally for clarity.
This config extends
tsconfig.base.json, which sets"strict": trueon line 9. The example is compliant. However, declaring"strict": truelocally would make the requirement explicit and protect against future changes to the base config.🤖 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 `@examples/flashcard-app/tsconfig.json` around lines 2 - 7, The tsconfig.json file's compilerOptions object inherits strict mode enforcement from the extended tsconfig.base.json but does not explicitly declare it locally. Add "strict": true to the compilerOptions object in this file to make the strict mode requirement explicit and protect against potential future changes to the base configuration.Source: Coding guidelines
🤖 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 `@examples/flashcard-app/src/index.tsx`:
- Around line 203-206: The showSummary() method sets done to true and calls
refresh() but does not clear the _feedback field, causing stale per-card status
messages to appear on the summary screen. Add a line in the showSummary() method
to reset the _feedback field to its initial/empty state (likely null, empty
string, or undefined depending on its type definition) before or after setting
done to true, ensuring the summary view displays without any leftover feedback
from individual cards.
---
Nitpick comments:
In `@examples/flashcard-app/tsconfig.json`:
- Around line 2-7: The tsconfig.json file's compilerOptions object inherits
strict mode enforcement from the extended tsconfig.base.json but does not
explicitly declare it locally. Add "strict": true to the compilerOptions object
in this file to make the strict mode requirement explicit and protect against
potential future changes to the base configuration.
🪄 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 Plus
Run ID: b4d9b6cc-464c-4ebc-91c0-0b3168b2b37b
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
examples/flashcard-app/package.jsonexamples/flashcard-app/src/index.tsxexamples/flashcard-app/tsconfig.json
Description
Adds a new example app examples/flashcard-app demonstrating a terminal-based
flashcard study tool. The app showcases flip interaction, self-marking,
card navigation, and a summary screen — interaction patterns not covered
by any existing example.
##Features
Related Issue
Closes #1729
Which package(s)?
examples/flashcard-app
Type of Change
type:bug)type:feature)type:docs)type:testing)type:refactor)type:design)type:accessibility)type:performance)type:devops)type:security)Checklist
needs-starcheck blocks your merge otherwise.bun vitest runbun run buildbun run typecheckCONTRIBUTING.md.type: short description.markDirty()(if your change affects rendering).anytypes without an inline comment explaining why.GSSoC 2026 Participation
Notes for the Reviewer
Follows the same structure as examples/quiz-app — single index.tsx with
a Widget subclass, no external dependencies beyond @termuijs/core and
@termuijs/widgets. Tested manually in Codespaces terminal with all key
bindings verified working.
I reviewed the code against quiz-app patterns and tested all interactions manually before submitting.
Summary by CodeRabbit
start/devscripts and type-checking to streamline running and validating the example.