Thanks for your interest in improving Lookout! This document explains the branching model, how to set up a local development environment, and what a good pull request looks like.
By participating you agree to abide by our Code of Conduct.
- Report a bug or request a feature via the issue tracker — please use the provided templates.
- Open a pull request for a fix or improvement (see below).
- Improve the docs.
For security issues, do not open a public issue — see SECURITY.md.
Lookout follows a git-flow style model:
| Branch | Purpose | Accepts merges from |
|---|---|---|
main |
Release / deployment. Always reflects the latest published release. Protected. | dev (and hotfix/*) |
dev |
Integration branch. The default branch and the base for all day-to-day work. Protected. | feat/*, fix/*, docs/*, chore/*, … |
feat/*, fix/*, docs/*, chore/*, refactor/* |
Short-lived topic branches for a single change. | — |
Rules of thumb:
- Always branch off
devand open your pull request againstdev— nevermain. mainonly ever receives merges fromdev(a release) or ahotfix/*branch (an urgent production fix, which is merged back intodevafterwards).- Keep topic branches focused: one logical change per branch / PR.
feat/my-change ──▶ dev ──▶ main ──▶ tag (e.g. 1.2.0) ──▶ Release
External contributors don't have write access to this repository, so work happens in a fork:
- Fork
Post-Math/Lookoutto your account. - Clone your fork and add the upstream remote:
git clone git@github.com:<you>/Lookout.git cd Lookout git remote add upstream git@github.com:Post-Math/Lookout.git
- Sync
devand create a topic branch off it:git fetch upstream git switch -c feat/my-change upstream/dev
- Make your changes (see Local development below) and commit using
Conventional Commits — e.g.
feat: add fit-to-height for tall diagramsorfix: show table button in Live Preview. - Push to your fork and open a PR targeting the
devbranch ofPost-Math/Lookout. Fill out the PR template. - Make sure CI is green and address review feedback. A code owner approval is required before merging.
Maintainers with write access follow the same model with branches on the main repository instead of a fork.
Lookout is written in TypeScript (src/main.ts) and bundled to main.js
by esbuild. To develop against a real vault:
- Use a throwaway test vault (not your real notes).
- Install dependencies:
npm ci. - Symlink (or copy) the repo into the vault's plugins folder:
ln -s "$(pwd)" /path/to/test-vault/.obsidian/plugins/lookout - Start the watch build:
npm run dev(re-bundlesmain.json every save). - In Obsidian, enable Lookout under Settings → Community plugins.
- Edit
src/main.ts/styles.css, then reload the plugin (toggle it off/on, or use the Reload app without saving command) to see your changes.
A note with a wide Mermaid diagram and a wide table is enough to exercise both features in Reading view and Live Preview. See docs/DEVELOPMENT.md for the full developer guide.
Run the same checks CI runs:
npm ci
npm run build # tsc --noEmit (type-check) + esbuild bundle
node --check main.js
node scripts/validate.mjsPlease also:
- Keep the drafting / survey-instrument visual language (quiet Obsidian theme surfaces, a single survey-cyan accent). Avoid introducing new colors.
- Follow Obsidian's code guidelines (no
innerHTML; clean up on teardown) and avoid adding runtime dependencies. - Update
README.md/ docs when behavior changes.
Releases are automatic on merge to main — there is no manual tagging step.
The version bump lands on dev first:
-
On a branch off
dev, prepare the release:- bump
versioninmanifest.json, - add the matching entry to
versions.json("<version>": "<minAppVersion>"), - move the
Unreleasednotes inCHANGELOG.mdinto a dated## [<version>]section.
Open a PR into
devand merge it. - bump
-
Open a release PR from
devintomainusing the release template (append?expand=1&template=release.mdto the compare URL) and merge it after a code-owner approval. -
On merge, the Release workflow reads the version from
manifest.json, pushes the bare-version tag (novprefix, to match Obsidian's convention), and publishes a GitHub release withmain.js,manifest.json, andstyles.css. It is idempotent — a merge that does not bump the version (e.g. a CI or docs change) is a no-op. -
Back-merge
mainintodevso the histories stay reconciled.
Thank you for contributing! 🛰️