Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.63 KB

File metadata and controls

56 lines (40 loc) · 1.63 KB

Contributing to OctoNext

Thanks for your interest in improving OctoNext! This project aims to stay small, readable, and easy to fork.

Getting started

bun install
bun run dev    # watch build into dist/

Load dist/ as an unpacked extension (see the README), then reload it from chrome://extensions after each rebuild.

Code style

  • TypeScript, strict mode. bun run typecheck must pass.
  • Keep files small. Aim for ~130 lines per file. If a file grows beyond that, split it into a folder or sibling module.
  • No documentation comments. Prefer clear names and types. Use a short comment only to explain a non-obvious "why".
  • Framework-free. The UI is plain DOM via the h() helper in src/ui/dom.ts. Avoid adding runtime UI dependencies.
  • Run bun run format before committing.

Tests

Pure logic (URL parsing, tree building, encoders) is covered by bun test. Add or update tests under tests/ when you change that logic.

bun run test
bun run typecheck
bun run lint:structure

lint:structure enforces the project conventions automatically: every file (including CSS) must be ≤130 lines, contain no comments, and use lowercase kebab-case names. CI runs it on every pull request, so run it locally first.

Commits

Use Conventional Commits:

feat(tree): lazy-load subtrees for large repositories
fix(sidebar): keep width within bounds while resizing

Keep commits focused and ensure the build and tests pass before opening a pull request.

Project structure

See ARCHITECTURE.md for the source map and data flow.