Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ Work Log decisions:
- Work logs are persisted to SQLite with creation timestamps.
- Work logs display the latest seven local calendar days, grouped by day.
- Work logs are displayed newest first within each day.
- `j` / `k` and `ArrowDown` / `ArrowUp`: move the selected Work Log entry when the Log section is active.
- `j` / `k` and `ArrowDown` / `ArrowUp`: move the selected Work Log row when the Log section is active.
- `gg` / `G`: move the selected Work Log row to the first or last visible row when the Log section is active.
- Empty `No log` day rows are selectable navigation targets, but cannot be edited with `e`.
- When navigating upward to the first row in a Work Log day group, scrolling keeps that day header visible.
- When the first or last visible Work Log row is selected, the Log list scrolls fully to the top or bottom.
- `e`: edit the selected Work Log entry when the Log section is active.
- Activating the Log section focuses the Work Log list and selects the latest log when there is no valid current selection.
- When a new Work Log is added, selection moves to it only if the latest log was selected; older selected logs stay selected.
Expand Down
50 changes: 25 additions & 25 deletions src/lib/components/KeyboardShortcutsDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
],
separator: "or",
},
{
action: "Move to First or Last Log",
keys: [{ value: "gg" }, { value: "G" }],
separator: "or",
},
],
},
];
Expand All @@ -141,6 +146,14 @@
onClose();
}
}

function separatorAfterIndex(shortcut: ShortcutItem) {
if (!shortcut.separator) {
return -1;
}

return Math.ceil(shortcut.keys.length / 2) - 1;
}
</script>

<dialog
Expand Down Expand Up @@ -188,31 +201,18 @@
{/if}
</span>
<span class="shortcut-keys">
{#if shortcut.separator}
{#each shortcut.keys.slice(0, 2) as key (key.value)}
<KeyboardKey
value={key.value}
label={key.label}
size="compact"
/>
{/each}
<span class="shortcut-separator">{shortcut.separator}</span>
{#each shortcut.keys.slice(2) as key (key.value)}
<KeyboardKey
value={key.value}
label={key.label}
size="compact"
/>
{/each}
{:else}
{#each shortcut.keys as key (key.value)}
<KeyboardKey
value={key.value}
label={key.label}
size="compact"
/>
{/each}
{/if}
{#each shortcut.keys as key, keyIndex (key.value)}
<KeyboardKey
value={key.value}
label={key.label}
size="compact"
/>
{#if shortcut.separator && keyIndex === separatorAfterIndex(shortcut)}
<span class="shortcut-separator">
{shortcut.separator}
</span>
{/if}
{/each}
</span>
</div>
{/each}
Expand Down
Loading