a very good jj gui
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: remove stack view feature

Remove the stack view (s shortcut) feature for now, to be reimplemented later.

- Remove stackViewChangeIdAtom from atoms.ts
- Delete StackIndicator.tsx component
- Remove stack view related code from AppShell.tsx
- Remove customRevset parameter from db.ts collections
- Simplify abandonRevision function signature
- Remove s shortcut from KeyboardShortcutsHelp

-42
-2
apps/desktop/src/atoms.ts
··· 5 5 // Inline jump mode: when active, shows jump hints on visible revision change IDs 6 6 // Stores the typed query prefix (empty string = initial state showing first letters) 7 7 export const inlineJumpQueryAtom = Atom.make<string | null>(null); 8 - // When set, shows only the stack (ancestors) from this change_id down to trunk 9 - export const stackViewChangeIdAtom = Atom.make<string | null>(null); 10 8 // View mode: 1 = overview (only revisions), 2 = split (revisions + diff panel) 11 9 export type ViewMode = 1 | 2; 12 10 export const viewModeAtom = Atom.make<ViewMode>(1);
-1
apps/desktop/src/components/KeyboardShortcutsHelp.tsx
··· 24 24 items: [ 25 25 { keys: ["n"], description: "New revision on selected" }, 26 26 { keys: ["e"], description: "Edit selected revision" }, 27 - { keys: ["s"], description: "Toggle stack view" }, 28 27 ], 29 28 }, 30 29 {
-39
apps/desktop/src/components/StackIndicator.tsx
··· 1 - import { useAtom } from "@effect-atom/atom-react"; 2 - import { X } from "lucide-react"; 3 - import { stackViewChangeIdAtom } from "@/atoms"; 4 - import { Badge } from "@/components/ui/badge"; 5 - import { useKeyboardShortcut } from "@/hooks/useKeyboard"; 6 - 7 - interface StackIndicatorProps { 8 - onDismiss?: () => void; 9 - } 10 - 11 - export function StackIndicator({ onDismiss }: StackIndicatorProps) { 12 - const [stackViewChangeId, setStackViewChangeId] = useAtom(stackViewChangeIdAtom); 13 - 14 - function handleDismiss() { 15 - setStackViewChangeId(null); 16 - onDismiss?.(); 17 - } 18 - 19 - useKeyboardShortcut({ 20 - key: "Escape", 21 - onPress: handleDismiss, 22 - enabled: !!stackViewChangeId, 23 - }); 24 - 25 - if (!stackViewChangeId) return null; 26 - 27 - return ( 28 - <div className="absolute top-2 left-2 z-20"> 29 - <Badge 30 - variant="secondary" 31 - className="text-xs cursor-pointer hover:bg-destructive/20 gap-1 pr-1" 32 - onClick={handleDismiss} 33 - > 34 - <span className="font-mono">{stackViewChangeId.slice(0, 8)}</span> 35 - <X className="h-3 w-3" /> 36 - </Badge> 37 - </div> 38 - ); 39 - }