Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ reviews:
path_instructions:
- path: "**/*"
instructions: |
Repo rules (AGENTS.md): no code comments except `// SAFETY:` on unsafe blocks; a new dependency needs a reason in the pull request, no git dependencies; no new or changed connections the browser makes on its own (PRIVACY.md), no telemetry; never lower a Shield level, weaken Lockdown, add a page-to-shell bridge, bypass TLS errors, skip private-session cleanup, widen an allowlist or loosen validation, signature or hash checks (docs/threat-model.md). Logic belongs in the shared crates, not in a shell; a feature should land on macOS, Windows, Linux, iOS and Android; clients left out need a docs/port-backlog.md entry, and security changes land on all.
Repo rules (AGENTS.md): no code comments unless the code cannot show it (a constraint, a workaround's reason, an invariant), and `// SAFETY:` on every unsafe block; a new dependency needs a reason in the pull request, no git dependencies; no new or changed connections the browser makes on its own (PRIVACY.md), no telemetry; never lower a Shield level, weaken Lockdown, add a page-to-shell bridge, bypass TLS errors, skip private-session cleanup, widen an allowlist or loosen validation, signature or hash checks (docs/threat-model.md). Logic belongs in the shared crates, not in a shell; a feature should land on macOS, Windows, Linux, iOS and Android; clients left out need a docs/port-backlog.md entry or, where the platform cannot support it, a documented gap in the client's plan doc, and security changes land on all. Private by default (rule 9): flag a new feature that is on by default while it sends data off the device, contacts a new party, shares data across sites, profiles or apps, or stores more about the user; flag a protection that is off by default.
- path: "**/*.rs"
instructions: "Every `unsafe` block or impl must carry a `// SAFETY:` comment stating the invariant that makes it sound (threat model S21). Flag any `unsafe` in a crate with `#![forbid(unsafe_code)]` and any removal of that attribute."
- path: "crates/shield/**"
Expand Down
17 changes: 15 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,23 @@ body:
label: Tarn version or commit
validations:
required: true
- type: dropdown
id: client
attributes:
label: Client
options:
- macOS
- Windows
- Linux
- iOS
- Android
validations:
required: true
- type: input
id: macos
id: os
attributes:
label: macOS version
label: Operating system version
placeholder: macOS 15.3, Windows 11 24H2, Fedora 43, iOS 18.2, Android 15
validations:
required: true
- type: textarea
Expand Down
15 changes: 13 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
Closes #

## What changed
## Problem

<!-- One or two sentences: what is wrong or missing, and for whom. One problem per pull request. -->

## Change

<!-- How this solves it. If it spans crates or clients, why each part belongs to the same fix. -->

## How it was tested

<!-- What you ran or did and what you observed; "tests pass" alone is not evidence.
UI changes: before and after screenshots, a short recording for motion or timing. -->

Checks run, and checks not run (and why):

Clients covered (the others get a `docs/port-backlog.md` entry):
Clients covered (each other one has a `docs/port-backlog.md` entry, or a documented gap in its plan doc):

New setting or behaviour: its default, and why (`AGENTS.md`, rule 9):

Protected paths (`.github/CODEOWNERS`), dependencies, pins or checks changed, and why:

Expand Down
280 changes: 241 additions & 39 deletions AGENTS.md

Large diffs are not rendered by default.

32 changes: 30 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,29 @@ default: if you do it differently, say so in the pull request and a maintainer d
- For a feature or a large change, open an issue first so you learn whether it is wanted before
you spend the work.
- Build the clients you can. A change that reaches one client is welcome with a
`docs/port-backlog.md` entry for the others (`AGENTS.md`, "Partial ports").
`docs/port-backlog.md` entry for the others (`AGENTS.md`, "Partial ports"); a client that
cannot support it gets the gap and its reason in its plan doc.
- Privacy comes first: anything that sends data off the device or keeps more about the user is
off until the user turns it on, and protections are on by default (`AGENTS.md`, rule 9).
- You do not need every toolchain below: set up the clients you work on, CI runs the rest.

## Ways to help

Code is one way; these help as much and need less setup:

- **Pick a [good first issue](https://github.com/Quavon-dev/tarn-browser/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).**
- **Port a feature.** Every entry in [`docs/port-backlog.md`](docs/port-backlog.md) names the
shared API to call, the client that already has it and what each remaining client needs. The
logic is in the shared crates, so a port is wiring.
- **Test an open pull request** on a client its author could not build, and comment with what you
saw.
- **Confirm or narrow a bug.** Say which client and version you reproduced it on, or that it no
longer happens on the latest release.
- **Point out duplicates** with a link to the original issue or pull request.

Search the open issues and pull requests before you start. Testing or reviewing an existing pull
request helps more than opening a second one for the same problem.

## Prerequisites

- For macOS: macOS 14 or later with Xcode (or its command line tools).
Expand All @@ -40,7 +60,9 @@ cargo test --locked # root workspace tests
```

`linux/`, `mobile/` and `nsh-shared/` are separate Cargo workspaces; run their checks in their own
directory.
directory. The commands for every client, the test environment variables and the code conventions
are in [`AGENTS.md`](AGENTS.md) ("Running Tarn", "Conventions"); where each crate fits is in
"Where code lives".

## Checks

Expand Down Expand Up @@ -162,6 +184,12 @@ issue. Run the **Issues** workflow by hand to count right away.

## Pull requests

Solve one problem per pull request and include everything that fix needs across the shared crates,
the clients, tests and docs; cleanup, refactors and a second fix go in their own. Say how you
checked the change and what you observed: "tests pass" alone is not evidence. A UI change comes
with before and after screenshots, motion or timing with a short recording, attached to the pull
request.

Every pull request to `main` needs every CI check green, every review conversation resolved
(CodeRabbit's included) and the approval of a Code Owner who did not author it:
`@Quavon-dev/tarn-maintainer`, and `@Quavon-dev/maintainers` for the protected paths. A commit
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ macOS is the lead client; every feature is meant to reach all five.
| **Android** | Native Shell | System WebView | Android 9 or later |

Shared by all of them: `browser-core` (state and decisions), `engine`, `shield` (blocking and
policy), `store` and `sync`. Contract: [`docs/shared-core.md`](docs/shared-core.md); security
policy), `store` and `ai`. Contract: [`docs/shared-core.md`](docs/shared-core.md); security
model and per-platform differences: [`docs/threat-model.md`](docs/threat-model.md).

## Build and run
Expand Down Expand Up @@ -406,9 +406,12 @@ Checks per workspace (each runs in its own directory; CI runs all of them):
| `mobile/` | same, plus `cargo clippy --target aarch64-apple-ios-sim --all-targets --locked -- -D warnings` |
| `linux/` | same, plus `linux/scripts/display-tests.sh` |
| Android build | `mobile/android/build.sh` |
| Windows (Git Bash, MSVC) | `export CEF_PATH="$(cygpath -w "$(scripts/fetch-cef.sh windows64)")"; cargo clippy --workspace --all-targets --locked -- -D warnings && cargo test --workspace --locked` |

`cargo deny check` runs where a workspace has a `deny.toml`. `unsafe` code is allowed only in
`crates/engine` (and later `crates/platform`); every other crate is `#![forbid(unsafe_code)]`.
`crates/engine` and `crates/platform`, plus one export in `crates/app-dll`, and in the platform
bindings `mobile/ios` and `mobile/android/rust`; the other root crates, `linux/` and `nsh-shared/`
forbid it.
Start with a [good first issue](https://github.com/Quavon-dev/tarn-browser/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
and read [`CONTRIBUTING.md`](CONTRIBUTING.md); AI-assisted contributions follow
[`AGENTS.md`](AGENTS.md). All of Tarn's code, packaging and release automation live in this
Expand Down
2 changes: 1 addition & 1 deletion crates/ai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "ai"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Experimental AI providers (Claude API, Claude CLI, Ollama) for page summaries and tab grouping; not wired into the app."
description = "AI providers (Claude API, Claude CLI, Ollama) for Tarn's assistant, page summaries and tab grouping."
repository.workspace = true
publish.workspace = true

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and the web view contract in `shared-core.md`.
| Engine bindings: the web view contract over each platform's engine | `crates/engine` (WebKit, Chromium/CEF), `linux/src/webview` (WebKitGTK), `mobile/ios` (WKWebView), `mobile/android` (Android System WebView) | every client |
| Platform services: updater, XPC | `crates/platform` | macOS, Windows |
| Import from other browsers | `crates/import` | macOS |
| AI integration and its CLI helper | `crates/ai`, `crates/cli-bridge` | `ai` is linked by `linux/` and `mobile/android`; no client UI uses it yet |
| AI integration and its CLI helper | `crates/ai`, `crates/cli-bridge` | `ai`: every client (the assistant, off until the user enables AI); `cli-bridge` is not built into any client |
| Sync file format | `crates/sync` | not built into any client |
| Release and filter-list pipelines | `.github/workflows/`, `crates/filter-bundle` | GitHub Actions |

Expand All @@ -33,7 +33,7 @@ and the web view contract in `shared-core.md`.
| Other browsers' profiles | Untrusted data | Read on the user's request by the importer (bookmarks, history, cookies) | S27 |
| GitHub release pipeline (maintainers, CI) | Trusted, gated by review and signing | Builds, signs and publishes releases, update feeds and filter bundles | S4, S13, S20 |
| Update and filter-list sources | Untrusted transport, signed content | Serve the Sparkle feed, the Windows feed and the filter bundle over HTTPS; the app accepts them only with a valid signature | S4, S20 |
| AI provider (Anthropic, or a local Ollama) | Untrusted output | Planned, not built into any client: would receive only the page content the user sends | S2, S3, S17 |
| AI provider (Anthropic, or a local Ollama) | Untrusted output | Receives only what the user sends once AI is enabled: the question, the earlier turns of that chat and what the user attached (`PRIVACY.md`, "AI request") | S2, S3, S17 |
| Operating system and engine vendors | Trusted platform | Supply WebKit, WebKitGTK, Android System WebView and the OS; Tarn bundles only Chromium (CEF) | "Who patches what" |
| Local programs | Untrusted | Nothing to connect to: no listening socket, debugging port or local API | S22 |

Expand Down
2 changes: 1 addition & 1 deletion docs/port-backlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Shared API: <crate::module::fn / type the clients call>.
Reference: <files of the clients that have it, e.g. crates/app/...>.

- [ ] macOS — <only if it started on another client>
- [ ] Windows — <what is missing, e.g. WebView2 hook for X>
- [ ] Windows — <what is missing, e.g. CEF hook for X>
- [ ] Linux — <linux/src/... to change>
- [ ] iOS — <mobile/app/... or mobile/ios/...>
- [ ] Android — <mobile/app/... or mobile/android/...>
Expand Down
Loading