-
Notifications
You must be signed in to change notification settings - Fork 0
Desktop app UI #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop app UI #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@tdn-desktop/src/App.css`:
- Around line 275-283: The checkmark SVG in .milkdown-editor
.milkdown-list-item-block .label.checked::after hardcodes stroke='white', which
can be invisible on light primary colors; update the rule to make the checkmark
color theme-aware by either using currentColor in the embedded SVG (e.g.,
stroke='currentColor') and setting color on .label.checked to a suitable theme
variable (like --primary-foreground) or by switching to an inline SVG mask/PNG
with background-color driven by a CSS variable or applying a CSS filter that
maps white to a theme variable; change the SVG stroke and ensure the element
sets the corresponding CSS variable (e.g., color or --checkmark-color) so
contrast follows the active theme.
In `@tdn-desktop/src/components/cards/TaskCard.tsx`:
- Around line 287-289: The placeholder string in the TaskCard component is
hardcoded and must be internationalized: import useTranslation from
'react-i18next', call const { t } = useTranslation() inside the TaskCard
component, then replace the literal placeholder on the textarea/input (the
element with className "... placeholder=\"Task title...\"") with a t(...) call
using a new translation key (e.g. 'task.titlePlaceholder' or similar) so the
user-facing string comes from i18n.
- Around line 314-333: Replace the hardcoded "Scheduled" and "Due" label props
on the DatePickerButton components with translated strings: import and use the
useTranslation hook (e.g., const { t } = useTranslation()) and pass
t('task.scheduled') and t('task.due') (or similar keys) to the label prop for
the DatePickerButton instances (references: DatePickerButton,
handleScheduledSelect, handleDueSelect, onScheduledChange, onDueChange). Add the
corresponding keys to the locales JSON files under /locales/*.json (e.g.,
"task": { "scheduled": "...", "due": "..." }) and ensure tests/type checks pick
up the new keys.
♻️ Duplicate comments (2)
tdn-desktop/src/components/cards/TaskCard.tsx (1)
198-200: Date parsing timezone issue previously flagged.The timezone concern with
new Date(task.scheduled)parsing YYYY-MM-DD as UTC has already been raised in a prior review. Please address that feedback.tdn-desktop/locales/en.json (1)
208-209: Missing.labelkey forrevealInFindercommand.Other commands include
.label,.description, and.success/.errorkeys. TherevealInFindercommand is missing its.labelkey for consistency.Suggested fix
+ "commands.revealInFinder.label": "Reveal in File Manager", "commands.revealInFinder.description": "Show the file in the system file manager", "commands.revealInFinder.error": "Failed to reveal file",
🧹 Nitpick comments (3)
tdn-desktop/src/components/cards/TaskCard.tsx (1)
211-246: Compact variant lacks keyboard accessibility.The compact card has
cursor-pointerbut notabIndexoronKeyDownhandler, making it inaccessible via keyboard navigation unlike the default variant.♻️ Suggested fix
<div onClick={onEditClick} onContextMenu={handleContextMenu} + onKeyDown={(e) => e.key === 'Enter' && onEditClick?.()} + tabIndex={0} + role="button" className={cn( 'group flex items-center gap-2 rounded-lg border px-2 py-1.5 transition-all cursor-pointer', 'hover:shadow-sm hover:shadow-black/5', + 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',tdn-desktop/src-tauri/tauri.conf.json (1)
16-19: Default window size may exceed some displays.The new default size of 1800×1200 is larger than many laptop screens (e.g., 1366×768 or 1440×900). While the minimum size (1000×700) is reasonable and window-state plugin will restore user preferences, the initial experience on smaller displays may have the window extending off-screen.
Consider reducing the default to something more universally compatible (e.g., 1280×800) or relying on
maximized: truefor larger initial coverage.tdn-desktop/locales/en.json (1)
49-87: Consider consolidating duplicate preference keys.Several keys are duplicated between
preferences.general.*andpreferences.vault.*namespaces (e.g.,tasksDir,tasksDirDescription,choose,notConfigured). If these render identical text, consider using a shared namespace (e.g.,preferences.shared.*) to reduce maintenance burden and ensure consistency.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
tdn-desktop/bun.lockis excluded by!**/*.locktdn-desktop/docs/developer/deep-linking.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-13-2-url-scheme.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-14-4-phase1-findings.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-14-4-ui-component-review.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-14-5-datepicker.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-14-6-quick-search.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-done/task-2026-01-14-7-navigation-history.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-todo/task-10-publishing.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-todo/task-8-quick-capture-pane.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-todo/task-9-reviews.mdis excluded by!**/*.mdtdn-desktop/docs/tasks-todo/task-x-undo.mdis excluded by!**/*.mdtdn-desktop/src/components/ui/README.mdis excluded by!**/*.md
📒 Files selected for processing (44)
tdn-desktop/knip.jsontdn-desktop/locales/en.jsontdn-desktop/package.jsontdn-desktop/src-tauri/capabilities/desktop.jsontdn-desktop/src-tauri/src/lib.rstdn-desktop/src-tauri/tauri.conf.jsontdn-desktop/src/App.csstdn-desktop/src/components/cards/TaskCard.tsxtdn-desktop/src/components/layout/LeftSideBar.tsxtdn-desktop/src/components/layout/MainWindow.tsxtdn-desktop/src/components/preferences/PreferencesDialog.tsxtdn-desktop/src/components/preferences/panes/AdvancedPane.tsxtdn-desktop/src/components/preferences/panes/AppearancePane.tsxtdn-desktop/src/components/preferences/panes/GeneralPane.tsxtdn-desktop/src/components/preferences/panes/QuickEntryPane.tsxtdn-desktop/src/components/preferences/panes/VaultPane.tsxtdn-desktop/src/components/preferences/shared/SettingsComponents.tsxtdn-desktop/src/components/quick-search/QuickSearch.tsxtdn-desktop/src/components/quick-search/QuickSearchResult.tsxtdn-desktop/src/components/quick-search/utils.tstdn-desktop/src/components/sidebar/AppSidebar.tsxtdn-desktop/src/components/ui/calendar.tsxtdn-desktop/src/components/ui/date-button.tsxtdn-desktop/src/components/ui/date-picker.tsxtdn-desktop/src/components/ui/popover-date-picker.tsxtdn-desktop/src/components/views/AreaView.tsxtdn-desktop/src/components/views/ComponentReference.tsxtdn-desktop/src/components/views/NoAreaView.tsxtdn-desktop/src/components/views/WeekView.tsxtdn-desktop/src/hooks/use-command-context.tstdn-desktop/src/hooks/use-deep-link.tstdn-desktop/src/lib/commands/app-commands.tstdn-desktop/src/lib/commands/commands.test.tstdn-desktop/src/lib/commands/navigation-commands.tstdn-desktop/src/lib/commands/types.tstdn-desktop/src/lib/deep-link.test.tstdn-desktop/src/lib/deep-link.tstdn-desktop/src/lib/task-navigation.test.tstdn-desktop/src/lib/task-navigation.tstdn-desktop/src/main.tsxtdn-desktop/src/store/navigation-store.test.tstdn-desktop/src/store/navigation-store.tstdn-desktop/src/store/task-detail-store.tstdn-desktop/src/store/ui-store.ts
💤 Files with no reviewable changes (1)
- tdn-desktop/knip.json
🚧 Files skipped from review as they are similar to previous changes (2)
- tdn-desktop/package.json
- tdn-desktop/src-tauri/capabilities/desktop.json
🧰 Additional context used
📓 Path-based instructions (5)
tdn-desktop/**/*.{tsx,css,scss}
📄 CodeRabbit inference engine (tdn-desktop/AGENTS.md)
Use CSS logical properties (e.g., text-start instead of text-left) for RTL support
Files:
tdn-desktop/src/App.csstdn-desktop/src/components/cards/TaskCard.tsx
tdn-desktop/**/*.{tsx,ts}
📄 CodeRabbit inference engine (tdn-desktop/AGENTS.md)
tdn-desktop/**/*.{tsx,ts}: Use selector syntax in Zustand hooks to access state (e.g.,useUIStore(state => state.leftSidebarVisible)), never destructure from Zustand hooks
Use getState() in callbacks to access Zustand state instead of destructuring
Use type-safe Tauri commands from@/lib/tauri-bindings(tauri-specta) with Result handling, never use string-based invoke()
Files:
tdn-desktop/src/components/cards/TaskCard.tsx
tdn-desktop/**/*.tsx
📄 CodeRabbit inference engine (tdn-desktop/AGENTS.md)
tdn-desktop/**/*.tsx: Use useTranslation hook from react-i18next in React components for internationalization
Place all user-facing strings in /locales/*.json translation files
Use React Compiler for automatic memoization handling (no manual useMemo/useCallback needed)
Files:
tdn-desktop/src/components/cards/TaskCard.tsx
tdn-desktop/**/*.{rs,tsx,ts}
📄 CodeRabbit inference engine (tdn-desktop/AGENTS.md)
Emit events from Rust to React using app.emit("event-name", data) and listen with listen("event-name", handler) in React
Files:
tdn-desktop/src/components/cards/TaskCard.tsxtdn-desktop/src-tauri/src/lib.rs
tdn-desktop/**/*.rs
📄 CodeRabbit inference engine (tdn-desktop/AGENTS.md)
Use modern Rust formatting with format!() macro (e.g., format!("{variable}"))
Files:
tdn-desktop/src-tauri/src/lib.rs
🧠 Learnings (7)
📚 Learning: 2025-12-28T17:09:11.509Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: tdn-desktop/AGENTS.md:0-0
Timestamp: 2025-12-28T17:09:11.509Z
Learning: Applies to tdn-desktop/**/*.{tsx,css,scss} : Use CSS logical properties (e.g., text-start instead of text-left) for RTL support
Applied to files:
tdn-desktop/src/App.css
📚 Learning: 2026-01-08T18:21:32.095Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: website/AGENTS.md:0-0
Timestamp: 2026-01-08T18:21:32.095Z
Learning: Applies to website/src/content/docs/**/*.mdx : Use H2 for main sections, H3 for subsections or individual items, and H4 rarely for deeply nested content
Applied to files:
tdn-desktop/src/App.css
📚 Learning: 2026-01-08T18:21:32.095Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: website/AGENTS.md:0-0
Timestamp: 2026-01-08T18:21:32.095Z
Learning: Applies to website/src/content/docs/**/*.mdx : Use <Card> and <CardGrid> components sparingly to add visual interest, with cards almost always including a title, icon, and content
Applied to files:
tdn-desktop/src/components/cards/TaskCard.tsx
📚 Learning: 2025-12-28T12:22:45.546Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: tdn-cli/CLAUDE.md:0-0
Timestamp: 2025-12-28T12:22:45.546Z
Learning: Applies to tdn-cli/crates/**/*.rs : Rust code must use the `#[napi]` macro to expose functions that will be auto-generated as TypeScript bindings
Applied to files:
tdn-desktop/src-tauri/src/lib.rs
📚 Learning: 2025-12-28T12:22:45.546Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: tdn-cli/CLAUDE.md:0-0
Timestamp: 2025-12-28T12:22:45.546Z
Learning: Regenerate TypeScript bindings by running `bun run build` after modifying any `#[napi]` function signatures, structs, or enums in Rust code
Applied to files:
tdn-desktop/src-tauri/src/lib.rs
📚 Learning: 2025-12-28T17:09:11.509Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: tdn-desktop/AGENTS.md:0-0
Timestamp: 2025-12-28T17:09:11.509Z
Learning: Applies to tdn-desktop/**/*.{tsx,ts} : Use type-safe Tauri commands from `@/lib/tauri-bindings` (tauri-specta) with Result handling, never use string-based invoke()
Applied to files:
tdn-desktop/src-tauri/src/lib.rs
📚 Learning: 2025-12-28T17:09:11.509Z
Learnt from: CR
Repo: dannysmith/taskdn PR: 0
File: tdn-desktop/AGENTS.md:0-0
Timestamp: 2025-12-28T17:09:11.509Z
Learning: Applies to tdn-desktop/**/*.tsx : Place all user-facing strings in /locales/*.json translation files
Applied to files:
tdn-desktop/locales/en.json
🔇 Additional comments (20)
tdn-desktop/src/App.css (6)
5-10: LGTM!The datepicker import and
field-sizing-contentutility are cleanly defined.
66-106: LGTM!Good handling of Milkdown's nested DOM structure with proper height inheritance. The
:focus-visibleaffordance (lines 96-100) correctly addresses keyboard accessibility, and the word-break handling prevents layout overflow from long URLs.
108-179: LGTM!Clean reset for block elements and well-structured heading hierarchy. The
border-bottomandpadding-bottomproperties are appropriate here since they're block-direction (vertical) properties unaffected by RTL text direction.
180-239: LGTM!Correct use of
padding-inline-startfor RTL support. The list item block component structure properly handles Milkdown's custom list rendering with flex layout. Based on coding guidelines, logical properties are correctly applied.
285-339: LGTM!Correct use of
padding-inline-startandborder-inline-startfor blockquotes ensuring RTL support. Code styling and horizontal rules are well-structured. Based on coding guidelines, logical properties are correctly applied.
340-443: LGTM!The Markdown preview styles mirror the editor styles appropriately with consistent use of logical properties (
padding-inline-start,border-inline-start) for RTL support. Good separation between editable and read-only rendering contexts. Based on coding guidelines, logical properties are correctly applied.tdn-desktop/src/components/cards/TaskCard.tsx (4)
16-73: Well-documented component with clear API.The JSDoc comment provides excellent context about usage scenarios, variants, and behavior. Props interface is comprehensive with proper TypeScript typing.
104-120: LGTM!Effects are correctly implemented with proper dependencies. The sync effect guards against overwriting during edit, and the focus effect handles auto-sizing appropriately.
248-273: LGTM!Default variant properly implements keyboard accessibility with
tabIndex={0},onKeyDownhandler, and focus-visible ring styles. Container query responsive design is well-applied.
371-448: LGTM!DatePickerButton subcomponent is well-structured with proper conditional rendering, popover state management, and clear separation between "add date" and "edit date" modes.
tdn-desktop/src-tauri/src/lib.rs (7)
11-14: LGTM!The vault module is correctly declared as public and the
VaultManagerimport is properly structured for state management later in the file.
24-37: LGTM!The bindings export logic is well-guarded for different build scenarios. The dual path check handles both development working directories gracefully.
60-71: LGTM!Good workaround with clear documentation. The issue reference helps future maintainers understand why
quick-paneis denylisted.
90-92: LGTM!Reasonable log rotation configuration. 5MB limit with
KeepOnestrategy prevents unbounded disk usage while retaining recent logs for debugging.
157-180: LGTM!Good initialization pattern with non-fatal error handling. The logging provides clear feedback about vault state, and users can configure paths in preferences if initialization fails.
54-58: Deep link event handling is properly implemented.The
useDeepLinkhook intdn-desktop/src/hooks/use-deep-link.tslistens for deep link events usingonOpenUrlfrom the Tauri deep-link plugin, parses thetaskdn://URLs, and routes them appropriately to navigate to the correct views.
188-235: Vault cleanup is already handled automatically.The
VaultManagerholds the file watcher in a struct field, which will be automatically cleaned up via Rust's Drop trait when theVaultManageris dropped. SinceVaultManageris managed by Tauri (registered with.manage()), it will be properly dropped when the application exits, ensuring file watchers are gracefully stopped. No explicit cleanup is needed on window close.tdn-desktop/src-tauri/tauri.conf.json (1)
64-68: LGTM!Deep link configuration is correctly set up for the
taskdn://URL scheme, consistent with the plugin registration inlib.rs.tdn-desktop/locales/en.json (2)
14-33: LGTM!Comprehensive menu localization with consistent naming conventions. As per coding guidelines, user-facing strings are properly placed in the locale file.
238-269: LGTM!Good additions for quick search, section UI, and collapsible notes. The
titlebar.defaultchange to "Tasks" provides appropriate app branding. Based on learnings, all user-facing strings are correctly placed in the locale file.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
Summary by CodeRabbit
New Features
UI
Preferences
Chores
✏️ Tip: You can customize this high-level summary in your review settings.