Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 5.02 KB

File metadata and controls

59 lines (46 loc) · 5.02 KB

Testing Codeian

Codeian is a native Obsidian desktop plugin. Browser previews do not exercise the Obsidian workspace, pop-out windows, theme variables, vault APIs, or Codex process lifecycle.

Setup and automated checks

Requirements: Node.js 20.19 or newer, npm, Obsidian desktop, and a working codex CLI for live-run checks.

npm install
npm test
npm run lint
npm run build
npm run verify:release
npm run smoke:test-vault
git diff --check

npm run build is the only supported way to regenerate main.js. npm run smoke:test-vault creates an isolated plugin fixture under the operating system temporary directory and prints its path for inspection; it does not launch Obsidian or remove that fixture.

Feature and command inventory

Feature Command or entry point Expected behavior
Sidebar conversation Ribbon action or Codeian: Open sidebar (open-sidebar) Opens the compact Codeian view in the right sidebar.
Main-area conversation Codeian: Open conversation in main area (open-conversation-main) Opens the selected session in a root workspace leaf.
Pop-out conversation Codeian: Open conversation in pop-out (open-conversation-popout) Opens the selected session in a native pop-out, or falls back once to the main area with a notice.
Reading mode Codeian: Toggle conversation reading mode (toggle-reading-mode) Switches a main or pop-out conversation between Chat and Read without changing session ownership.
Current-note context Codeian: Add current note context (add-current-note-context) Adds the active note to the sidebar composer as protected context that is not persisted or mirrored.
Session management Session menu, New chat, switch, rename, tag, and delete controls Retains up to five stable-order sessions with one run per session and shared drafts/output across surfaces.
Response rendering Run a prompt from any Chat surface Streams status/output, renders final Markdown and vault links, and exposes response/code copy actions.

Isolated-vault GUI procedure

  1. Create a new empty Obsidian vault outside any production or synced vault.
  2. Run npm run build and copy manifest.json, main.js, and styles.css into <vault>/.obsidian/plugins/codeian/.
  3. In Obsidian, open Settings > Community plugins, disable Restricted mode if required, enable Codeian, and configure the Codex command and working directory.
  4. Run each command from the command palette and confirm the sidebar, main-area, and pop-out surfaces open without launching a model-catalog refresh per additional surface.
  5. At a 320 x 600 sidebar size, verify the header, session row, message stream, and composer remain visible and do not overlap.
  6. Open the same session in two surfaces. Type an ordinary draft and confirm the unfocused composer updates; focus the other composer and confirm its local text is not overwritten. Add current-note context and confirm its text is not copied into another surface or persisted after reload.
  7. Start a run from one surface and confirm both surfaces render status/output within 500 ms. Attempt a second send and confirm its prompt remains. Close the initiating surface, let the run finish, and reopen the session.
  8. Fill all five sessions with active runs and confirm creating another session is rejected without changing the session list. After one run finishes, create a session and confirm no running session is removed.
  9. While streaming a long response, scroll away from the tail and confirm the position remains stable. Return near the tail and confirm updates auto-follow. In reading mode, verify the response column remains approximately 760-860 px on sufficiently wide windows.
  10. During streaming and after completion, use response copy and code copy in both chat and reading modes. Verify vault links in a pop-out open through Obsidian.
  11. Test light and dark themes plus one third-party theme. Focus every interactive control with the keyboard and inspect narrow and wide workspace layouts.
  12. Disable and re-enable the plugin, then restart Obsidian and verify serialized workspace/pop-out leaves restore their session and mode.

Host ownership

Obsidian owns Codeian typography and colors. The stylesheet uses Obsidian variables such as --font-interface, --font-monospace, --text-normal, --background-primary, and --interactive-accent; it does not load web fonts or define an independent palette. Test theme compatibility in Obsidian rather than comparing browser screenshots to fixed font or color values.

Cleanup and reset

  1. Cancel active runs and close Codeian pop-outs.
  2. Disable Codeian in Settings > Community plugins.
  3. Remove <vault>/.obsidian/plugins/codeian/ from the isolated vault.
  4. Delete the isolated vault when testing is complete.
  5. Delete the codeian-vault-* smoke fixture at the exact temporary path printed by npm run smoke:test-vault after inspection.
  6. For settings-only reset, close Obsidian and remove <vault>/.obsidian/plugins/codeian/data.json, then reopen Obsidian and reconfigure the plugin.