No description
Find a file
Kwila Dev Bot fe4ceec55b
All checks were successful
CI / Unit tests (push) Successful in 20s
CI / E2E tests (push) Successful in 55s
test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4)
Adds a full automated test suite with CI.

## Vitest Unit Tests (41 tests)

- Extracted `buildRepoTree`, `matchesSearch`, and `splitPath` from the Svelte component into `repo-browser.ts` so they can be unit tested
- Tests cover: path splitting, tree construction (nested folders, sorting, file vs folder), search matching (substring, tokenized, subsequence), and all 6 file operation functions (`createFile`, `createDirectory`, `renameFile`, `renameDirectory`, `deleteFile`, `deleteDirectory`) using mocked `FileSystemDirectoryHandle`
- Run with: `npm run test:unit`

## Playwright E2E Tests (17 tests)

Uses `page.addInitScript` to inject a mock `FileSystemDirectoryHandle` that intercepts `window.showDirectoryPicker` — no real filesystem or browser permission prompt needed.

Also stubs `indexedDB` so the mock handles (which can't be structured-cloned) don't break persistence.

**app.test.ts** (12 tests):
- Page load, title, editor visible
- Open folder → folder name in sidebar, file tree appears
- Folder/file nodes in tree, selecting a file loads content
- Folder expand/collapse
- Search filtering and clear
- Sidebar collapse/expand

**file-ops.test.ts** (5 tests):
- Create new file (inline input → Enter → appears in tree)
- Create new folder (inline input, Escape to cancel)
- Rename file via context menu
- Delete file via context menu (with `window.confirm` mock)
- Cancel rename with Escape

Run with: `npm run test:e2e`

## Forgejo Actions CI (`.forgejo/workflows/ci.yml`)

Two jobs on PR and push to main:
- **unit**: `npm ci` → `svelte-check` → `vitest run`
- **e2e**: `npm ci` → install Chromium → `npm run build` → `playwright test`

Failed E2E runs upload the Playwright HTML report as an artifact.

Co-authored-by: exe.dev user <exedev@kwila-notebook.exe.xyz>
Reviewed-on: #4
Co-authored-by: Kwila Dev Bot <dev-bot@kwila.cloud>
Co-committed-by: Kwila Dev Bot <dev-bot@kwila.cloud>
2026-05-30 12:43:50 -04:00
.forgejo/workflows test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
assets docs: add logo theme colors 2026-05-06 08:56:30 +00:00
e2e test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
scripts feat: basic markdown editor (#1) 2026-05-06 06:13:34 -04:00
src test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
static/assets feat: basic markdown editor (#1) 2026-05-06 06:13:34 -04:00
.gitignore test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
AGENTS.md docs: tighten readme wording 2026-05-06 09:01:18 +00:00
justfile feat: basic markdown editor (#1) 2026-05-06 06:13:34 -04:00
LICENSE chore: initial project setup 2026-05-06 04:35:59 -04:00
package-lock.json test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
package.json test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
playwright.config.ts test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00
README.md docs(readme): update roadmap (#2) 2026-05-13 06:24:45 -04:00
svelte.config.js feat: basic markdown editor (#1) 2026-05-06 06:13:34 -04:00
tsconfig.json feat: basic markdown editor (#1) 2026-05-06 06:13:34 -04:00
vite.config.ts test: add vitest unit tests, playwright E2E tests, and Forgejo Actions CI (#4) 2026-05-30 12:43:50 -04:00

Kwila Notebook logo

Kwila Notebook

A local-first markdown editor built with SvelteKit and OverType.

kwila-notebook.exe.xyz

What's included

  • SvelteKit app shell
  • OverType markdown editor with toolbar
  • live preview and mobile-friendly editing behavior
  • local draft persistence in the browser
  • just recipes for running, testing, and installing a systemd service

Storage model

  • notes are edited as markdown
  • the first version stores the draft locally in the browser
  • the service runs the built app on port 8000

Planned Work

  • Git-based version history and synchronization
  • Mobile-friendly interface
  • Desktop web experience
  • File attachments
  • Mermaid diagrams
  • Note organization and search
  • Offline support
  • Backlinks and references

Principles

Kwila Notebook favors:

  • permanence over trends
  • clarity over complexity
  • ownership over platforms
  • simple tools that age well

Development

just run
just test
just deploy

License

See LICENSE for license terms.