fixes: what the audit turned up

- POST /api/diary/day finds a day's entry, or starts it at the root of the
  diary, by the server's clock. T, the calendar and a capture all use it, so
  they can no longer write two entries for one day: before, T counted days by
  the browser's midnight and wrote into whichever diary folder was last open.
- A Ctrl-P result opens beside the results, as a / result does, so n and N
  go on from it rather than finding no search.
- A card's description resolves its [[links]] the way a document does, and
  following one leaves the card for what it leads to.
- gf on the board opens a card's notes. Enter was documented for that, but
  Enter turns the card over.
- The pane header and the status line show where the open node is, rather
  than where the list is, so a node from another space shows its own path.
This commit is contained in:
nvrl committed 2026-10-22 03:10:49 +02:00
1 parent ac3ad166e5
commit 7f8a3816d3
22 files changed
+321 -114

No files matched your search

+2 -18
View File
@@ -465,7 +465,7 @@ export const commands: CommandSpec[] = [
await workspace.guard(() => workspace.createCard(arg.trim()))
},
bang: {
help: 'add a card linked to the open document — Enter on it opens the document',
help: 'add a card linked to the open document — gf on it opens the document',
run: async (arg) => {
// On the board the tree is not on screen, so only the open document
// can be meant; elsewhere it is whatever has focus.
@@ -688,23 +688,7 @@ export const commands: CommandSpec[] = [
group: 'documents',
help: "open today's diary entry, starting one if there is none yet",
run: async () => {
await workspace.guard(async () => {
// The diary is one space among several now, so :today goes there first
// rather than writing the day into whatever folder was being browsed.
const home = workspace.spaces.find((space) => space.role === 'diary')
if (home && workspace.parentId !== home.id) await workspace.enterSpace(home.id)
else if (workspace.query) await workspace.search('')
const midnight = new Date()
midnight.setHours(0, 0, 0, 0)
const from = Math.floor(midnight.getTime() / 1000)
const today = workspace.nodes.find(
(node) =>
node.kind === 'document' && node.created_at >= from && node.created_at < from + 86400,
)
if (today) await workspace.openNode(today.id, true)
else await workspace.createDocument()
})
await workspace.guard(() => workspace.openDay())
hooks.focusEditor()
},
},