Something went wrong. Try again.
Github-style local code review for working in agents in jujutsu repos
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859<script lang="ts"> import { changes, mainChange, currentChange, selectChange } from '$lib/stores/changes'; import { vcs } from '$lib/stores/files';
let busy = $state<string | null>(null);
async function select(changeId: string) { if (busy || changeId === $currentChange) return; busy = changeId; try { await selectChange(changeId); } catch (err) { console.error(err); } finally { busy = null; } }</script>
{#if $vcs === 'jj'} <div class="border-t border-border max-h-72 overflow-y-auto shrink-0"> <div class="px-3 py-2 text-xs font-semibold text-tertiary uppercase tracking-wider flex items-center justify-between"> <span>Changes ({$changes.length})</span> {#if $mainChange} <span class="text-[10px] text-muted normal-case tracking-normal font-mono" title="Bookmark main is at {$mainChange.changeId}"> main: {$mainChange.changeId} </span> {/if} </div>
{#if $changes.length === 0} <div class="px-3 pb-3 text-xs text-muted">No changes since main</div> {:else} <div class="space-y-px px-1 pb-2"> {#each $changes as change (change.changeId)} {@const active = change.changeId === $currentChange} {@const pending = busy === change.changeId} <button class="w-full text-left px-2 py-1.5 rounded flex items-start gap-2 text-xs transition-colors {active ? 'bg-hover/80 text-primary' : 'text-secondary hover:bg-hover/50'} {pending ? 'opacity-60' : ''}" onclick={() => select(change.changeId)} title={change.description || '(no description)'} > <span class="font-mono text-[10px] text-muted shrink-0 mt-0.5">{change.changeId}</span> <span class="flex-1 truncate {active ? 'font-medium' : ''}"> {change.description || '(no description)'} </span> {#each change.bookmarks as bm} <span class="shrink-0 text-[10px] px-1 rounded bg-accent-green/20 text-accent-green">{bm}</span> {/each} {#if change.isWorkingCopy} <span class="shrink-0 text-[10px] px-1 rounded bg-accent-blue/20 text-accent-blue" title="Working copy @">@</span> {/if} </button> {/each} </div> {/if} </div>{/if}