Feature/20260714 product design upgrade 1 - #49
Merged
Conversation
…ks from App.tsx Reduce App.tsx from 1788 to 1034 lines (-42%) by extracting: - ContentArea: view routing (graph/thoughts/files) + right panel - EditorView: editor rendering (doc bar, markdown editor, find bar) - AppTopToolbar: top toolbar (tab bar, save button, window controls) - useGlobalShortcuts: Cmd+L/Cmd+Shift+P/Cmd+Shift+W/Cmd+F - useWindowLifecycle: beforeunload + Tauri onCloseRequested flush - useHeadingNavigation: ProseMirror heading scroll with retry This prepares a clean insertion point in ContentArea for the upcoming Practice Mode (leftPanelView === "practice") without touching App.tsx. No behavioral changes — pure structural extraction.
- Add "practice" to LeftPanelView type - Add brain icon + due-count badge to ActivityBar - Add practice branch in ContentArea (full-view takeover) - Create PracticeMode shell with review/discovery sub-tab switching - Pass reviewDueCount from App to ActivityBar for badge display - Add i18n keys for practice label (en/zh) Implements spec 01-practice-mode-routing.
Create PracticeReviewPane based on ChallengeReviewPanel with: - All candidate/sourceType branches removed (thoughts only) - Front-end filter: items.filter(i => i.sourceType === 'thought') - Simplified stats line: 'Today N/cap · M thoughts due' - Keyboard flow: Enter to submit, Tab/Arrow to next - onFocusThought callback for future source preview integration - onReviewCompleted callback for completion transition Integrate into PracticeMode shell with review completed state. Implements spec 02-practice-review-pane.
- Create PracticeSourcePreview: read-only markdown rendering with paragraph highlight using react-markdown + remark-gfm - Split PracticeMode body into left (review/discovery) and right (source preview) panes using CSS grid - Source preview loads file via existing read_markdown_file command - Highlights thought paragraph (startLine..endLine) with yellow accent - Auto-scrolls to highlighted section on thought focus change - Empty/loading/error states handled Implements spec 03-practice-source-preview.
…ates commands - Add DiscoveryFilter, DiscoveryListResponse, DiscoveryReasonCounts types - Implement list_candidates_filtered with: - marking_reason filter - sort_by (similarity/age/freshness via file mtime) - offset/limit pagination - count_by_reason for filter tab badges - Implement batch_dismiss for multi-select dismiss operations - Register both commands in Tauri handler list - sort_by_freshness uses fs::metadata mtime (Phase 1 approach) All 453 existing tests pass. Implements spec 04-backend-discovery-list.
Co-authored-by: OpenCode <noreply@opencode.ai>
Review functionality now lives exclusively in Practice Mode. Keyboard shortcut (Cmd+Shift+Y) and onboarding both navigate to Practice. Co-authored-by: OpenCode <noreply@opencode.ai>
- New InlineReviewReminder shows a one-line prompt to visit Practice Mode - No LLM call needed: fetches review queue and picks first due thought - Daily cap raised from 2 to 3 (low-cost reminder can show more often) - App listens for 'knowforge:goToPractice' event to navigate - Removed ChallengeReviewInline component and CSS Co-authored-by: OpenCode <noreply@opencode.ai>
- DiscoveryDetailView routes to type-specific sub-components - DiscoverySimilarityCompare: side-by-side excerpt comparison - DiscoveryClusterView: cross-doc recurrence with cluster info - DiscoveryIsolatedContext: source context with highlighted paragraph - Right column in discovery mode now shows detail view (not raw preview) - Promote/dismiss from detail view refreshes the left pane list - 'View in source' navigates back to editor mode Co-authored-by: OpenCode <noreply@opencode.ai>
…omote) Backend: - New batch_promote function with per-file reverse-line-order processing - New batch_promote_candidates Tauri command (limit: 50) Frontend: - Multi-select mode with checkboxes on candidate cards - Batch operations bar: select all, batch dismiss, batch promote, clear - Individual card actions hidden during multi-select mode - refreshKey prop for external refetch trigger Co-authored-by: OpenCode <noreply@opencode.ai>
Backend: - New list_daily_picks function with day-of-year rotation across reason types - New list_discovery_daily_picks Tauri command Frontend: - PracticeReviewCompletion component with daily picks teaser - 'Back to notes' exits Practice Mode, 'Explore discoveries' switches tab - App.tsx listens for 'knowforge:goToFiles' navigation event Co-authored-by: OpenCode <noreply@opencode.ai>
…wReminder Adds 42 translation keys covering: - practice.* (tabs, stats, source preview, completion screen) - discovery.* (filters, cards, batch ops, detail views) - reviewReminder.* (inline post-conversation prompt) Previously these relied solely on inline fallback strings. Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
Co-authored-by: OpenCode <noreply@opencode.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
变更类型
检查清单
npm run build(若改动前端)cd src-tauri && cargo test(若改动 Rust)备注