Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Desktop

The desktop app in app/desktopUi (D-76; the desktop plan has the spike behind it): the window with its sidebar, top bar, notes grid, editor and history, plus the editor and database. The tests run on the JVM with ./gradlew :app:desktopUi:test, in-process with no window. The window tests use a 1280×800 offscreen scene (runSkikoComposeUiTest) and a temporary database file.

  • A window with no notes offers a new note
    • Desktop UI: JotryDesktopUiTest.anEmptyWindowOffersANewNote
  • A new note takes typing and saves it (the Saved badge shows once the text is written)
    • Desktop UI: JotryDesktopUiTest.aNewNoteTakesTypingAndSavesIt
  • Text typed in the last half second is saved when the note is closed
    • Desktop UI: JotryDesktopUiTest.closingANoteSavesTextTypedInTheLastHalfSecond
  • Pinned notes get their own section at the top of the grid
    • Desktop UI: JotryDesktopUiTest.pinnedNotesGetTheirOwnSectionAtTheTop
  • Deleting shows the Undo bar, and Undo brings the note back
    • Desktop UI: JotryDesktopUiTest.deletingShowsUndoAndUndoBringsTheNoteBack
  • The trash lists deleted notes and restores them
    • Desktop UI: JotryDesktopUiTest.theTrashListsDeletedNotesAndRestoresThem
  • Search from the top bar lists the notes that match in a sheet over the page, and only those
    • Desktop UI: JotryDesktopUiTest.searchFindsNotesByTheirText
  • Clicking a search result opens the note and closes the sheet
    • Desktop UI: JotryDesktopUiTest.clickingASearchResultOpensTheNoteAndClosesTheResults
  • Ctrl/Cmd+click on a note link in the editor opens the target note (a plain click only places the caret; web links go to the system’s opener, which is not tested)
    • Desktop UI: JotryDesktopUiTest.commandClickOnANoteLinkOpensTheTargetNote
  • Typing [[ in the editor opens the note picker, and choosing a note replaces the brackets with a link to it
    • Desktop UI: JotryDesktopUiTest.typingDoubleBracketsOffersNotesAndChoosingOneInsertsALink
  • A new notebook gets a place in the sidebar and takes new notes
    • Desktop UI: JotryDesktopUiTest.aNewNotebookGetsAPlaceInTheSidebarAndTakesNewNotes
  • History lists the versions, shows what changed, and restores an earlier one
    • Desktop UI: JotryDesktopUiTest.historyListsVersionsAndRestoresAnEarlierOne
  • Typing goes through the shared editor session
    • Desktop UI: DesktopEditorUiTest.typingGoesThroughTheSession
  • The Bold button formats the selection (the toolbar can’t take focus, so the editor keeps its selection)
    • Desktop UI: DesktopEditorUiTest.boldButtonFormatsTheSelection
  • Cmd+B makes the selection bold and Cmd+Z undoes it through the session, not the text field’s own undo
    • Desktop UI: DesktopEditorUiTest.commandBIsBoldAndCommandZUndoesThroughTheSession
  • A checklist line gets a checkbox in the gutter, and clicking it checks the task
    • Desktop UI: DesktopEditorUiTest.checklistLineGetsACheckboxThatToggles
  • Enter on a checklist line starts a new task
    • Desktop UI: DesktopEditorUiTest.enterOnAChecklistLineStartsANewTask
  • ComposeTextEditor spike: typing goes through the shared editor session
    • Desktop UI: LibraryEditorUiTest.typingIsForwardedToTheSession
  • ComposeTextEditor spike: Undo and Redo come from the session and replace the library’s text
    • Desktop UI: LibraryEditorUiTest.undoComesFromTheSessionNotTheLibrary
  • ComposeTextEditor spike: Bold goes through the session and the text is restyled
    • Desktop UI: LibraryEditorUiTest.boldGoesThroughTheSessionAndRestylesTheText
  • ComposeTextEditor spike: Enter on a checklist line is continued by the session only (the library’s own list behavior is switched off)
    • Desktop UI: LibraryEditorUiTest.enterOnAChecklistLineIsContinuedByTheSessionOnly
  • ComposeTextEditor spike: Markdown round-trips through the library’s text
    • Desktop UI: LibraryEditorUiTest.markdownRoundTripsThroughTheLibraryText
  • The core works on a database file: edit, save, reopen, search, history and export (also run inside the native binary with JOTRY_SMOKE=1, which also loads libsodium and makes keys; with JOTRY_SMOKE_SYNC_SERVER=https://… it also registers a join request on that server, which tries the HTTP client, TLS and CBOR in the build)
    • Desktop JVM: DatabaseTest.smokeTestPassesOnAFreshFile
  • Notes survive reopening the database file
    • Desktop JVM: DatabaseTest.notesSurviveReopening
  • A version 1 database file is migrated on open
    • Desktop JVM: DatabaseTest.aVersionOneDatabaseIsMigrated
  • The macOS Keychain store keeps secrets byte for byte, replaces them on the next put, keeps them per service, and returns null for an unknown name (the real login Keychain under a throwaway service; skipped off macOS)
    • Desktop JVM: MacKeychainSecretStoreTest.aSecretComesBackByteForByteAndIsReplacedByTheNextPut, anUnknownNameIsNullAndDeletingTwiceIsFine, secretsAreKeptPerService
  • A key name that could break the security command is refused
    • Desktop JVM: MacKeychainSecretStoreTest.aNameThatCouldBreakTheCommandIsRefused
  • Where no key store is built, the Sync screen says so
    • Desktop UI: DesktopSyncUiTest.whereNoKeyStoreIsBuiltSyncSaysSo
  • Turning on sync needs an address and a code, then shows the 24 words and checks the words typed back
    • Desktop UI: DesktopSyncUiTest.turningOnNeedsAnAddressAndACodeThenShowsTheWordsAndChecksThem
  • Joining by QR code needs the server address first, and an unreachable server is reported with a button for a new code
    • Desktop UI: DesktopSyncUiTest.joiningNeedsTheServerAddressFirst, joiningAnUnreachableServerSaysSoAndOffersANewCode
  • The build’s server address is suggested on the Sync screen and can be replaced
    • Desktop UI: DesktopSyncUiTest.theBuildsServerAddressIsSuggestedAndCanBeChanged

Gaps

  • Sync on the desktop is tested only up to the server: no test creates a group, joins by code, approves a pasted code or syncs from the window (the engine itself is tested in sync-engine.md), and neither is the status view, turning sync off, nor syncing when the window comes to the front.

  • The Keychain store and the copy buttons have not been tried inside the native binary (only libsodium and the HTTPS request have, by the smoke run).

  • The Keychain store is not run in CI (the runners’ Keychains differ), and nothing tests that another program of the user can read the items without a prompt, which the store’s description says it can.

  • The native binary is checked only by the smoke run (JOTRY_SMOKE=1) and the first-frame run in .github/workflows/desktop-spike.yml. The UI tests don’t run against it.

  • The Nucleus window (tao title bar, menus, tray, file dialogs) isn’t tested. The UI tests render the composables offscreen.

  • Window screens not covered: moving a note between notebooks, pinning from the menu in the trash, emptying the trash and its Undo, renaming a title by hand, Cmd/Ctrl+N and Cmd/Ctrl+F, the dark theme, and a window narrower than about 1100 dp (the columns don’t adapt yet).

  • Saving when the window closes (Launch.flushBeforeExit) is untested.

  • Headings, lists, quotes, links, IME composition and paste are untested in the desktop editor.

  • The ComposeTextEditor spike is driven through the library’s state API (insertTypedString), not real key events or IME. Native image, typing speed on large notes and the library’s context-menu Undo are untested.

  • Screenshots: no desktop screenshot tests (Roborazzi supports desktop). The window was only looked at in light and dark by rendering it offscreen once.