fix: plan mode ui overhaul #596
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 3 commits into
main fromrefs/pull/596/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub- apps/web/src/components/ChatView.tsx line 1938OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1941,5 +1932,7 @@1941193219421933 useEffect(() => {19431934 setExpandedWorkGroups({});1935+ setPlanSidebarOpen(false);19441936 }, [activeThread?.id]);194519371938+ // Auto-open plan sidebar when a plan becomes availableapps/web/src/components/ChatView.tsx lines 4385 to 4392OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -4371,0 +4372,21 @@4372+ return () => {4373+ if (autoAdvanceTimerRef.current !== null) {4374+ window.clearTimeout(autoAdvanceTimerRef.current);4375+ }4376+ };4377+ }, []);4378+4379+ // Keyboard shortcut: number keys 1-9 select corresponding option and auto-advance4380+ useEffect(() => {4381+ if (!activeQuestion || isResponding) return;4382+ const handler = (event: globalThis.KeyboardEvent) => {4383+ // Only handle bare number keys (no modifiers)4384+ if (event.metaKey || event.ctrlKey || event.altKey) return;4385+ // Allow from within the Lexical editor (contenteditable divs)4386+ const target = event.target;4387+ if (4388+ target instanceof HTMLInputElement ||4389+ target instanceof HTMLTextAreaElement4390+ ) {4391+ return;4392+ }
- apps/web/src/components/ChatView.tsx lines 4480 to 4484OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -4384,11 +4469,16 @@4469+ <span className="text-[11px] font-semibold tracking-widest text-muted-foreground/50 uppercase">4470+ {activeQuestion.header}4471+ </span>4472+ </div>43844473 </div>4385- <div className="mt-3 flex flex-wrap gap-2">4386- {activeQuestion.options.map((option) => {4474+ <p className="mt-1.5 text-sm text-foreground/90">{activeQuestion.question}</p>4475+ <div className="mt-3 space-y-1">4476+ {activeQuestion.options.map((option, index) => {43874477 const isSelected = progress.selectedOptionLabel === option.label;4478+ const shortcutKey = index < 9 ? index + 1 : null;43884479 return (4389- <Button4480+ <button43904481 key={`${activeQuestion.id}:${option.label}`}4391- size="sm"4392- variant={isSelected ? "default" : "outline"}4482+ type="button"43934483 disabled={isResponding}43944484 onClick={() => onSelectOption(activeQuestion.id, option.label)}
binbandit(GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
63ffa5c1-6476-4d32-ba31-17e4cfcd3a36You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.