Skip to content

Commit 4e55ba3

Browse files
committed
Merge revamp-design into main - Ognom 2.0
2 parents 22ffb14 + eb026d2 commit 4e55ba3

169 files changed

Lines changed: 8436 additions & 10536 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@ jobs:
1010
name: Typecheck & tests
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 20
1717
cache: npm
18-
- run: npm ci
19-
- run: npm run typecheck
20-
- run: npm test
18+
- run: npm ci
19+
- run: npm run typecheck
20+
- run: npm test
2121

2222
backend:
2323
name: Rust check & tests
2424
# macOS runners build Tauri without extra system deps (webkit is bundled).
2525
runs-on: macos-latest
2626
steps:
27-
- uses: actions/checkout@v4
28-
- uses: dtolnay/rust-toolchain@stable
29-
- uses: Swatinem/rust-cache@v2
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
- uses: Swatinem/rust-cache@v2
3030
with:
3131
workspaces: src-tauri
32-
- run: cargo check --manifest-path src-tauri/Cargo.toml
33-
- run: cargo test --manifest-path src-tauri/Cargo.toml
32+
- run: cargo check --manifest-path src-tauri/Cargo.toml
33+
- run: cargo test --manifest-path src-tauri/Cargo.toml

.github/workflows/release.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@ jobs:
2121
name: Test & typecheck
2222
runs-on: ubuntu-22.04
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v4
2525

26-
- name: Install Linux dependencies
26+
- name: Install Linux dependencies
2727
run: |
2828
sudo apt-get update
2929
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file \
3030
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
3131
32-
- uses: actions/setup-node@v4
32+
- uses: actions/setup-node@v4
3333
with:
3434
node-version: 20
3535
cache: npm
3636

37-
- uses: dtolnay/rust-toolchain@stable
37+
- uses: dtolnay/rust-toolchain@stable
3838

39-
- uses: swatinem/rust-cache@v2
39+
- uses: swatinem/rust-cache@v2
4040
with:
4141
workspaces: src-tauri
4242

43-
- name: Install frontend dependencies
43+
- name: Install frontend dependencies
4444
run: npm ci
4545

46-
- name: Typecheck & build frontend
46+
- name: Typecheck & build frontend
4747
run: npm run build
4848

49-
- name: Rust tests
49+
- name: Rust tests
5050
working-directory: src-tauri
5151
run: cargo test --locked
5252

@@ -57,51 +57,51 @@ jobs:
5757
fail-fast: false
5858
matrix:
5959
include:
60-
- name: macOS (Apple Silicon)
60+
- name: macOS (Apple Silicon)
6161
platform: macos-latest
6262
args: --target aarch64-apple-darwin
6363
targets: aarch64-apple-darwin
64-
- name: macOS (Intel)
64+
- name: macOS (Intel)
6565
platform: macos-latest
6666
args: --target x86_64-apple-darwin
6767
targets: x86_64-apple-darwin
68-
- name: Linux (x64)
68+
- name: Linux (x64)
6969
platform: ubuntu-22.04
7070
args: ""
7171
targets: ""
72-
- name: Windows (x64)
72+
- name: Windows (x64)
7373
platform: windows-latest
7474
args: ""
7575
targets: ""
7676
runs-on: ${{ matrix.platform }}
7777
steps:
78-
- uses: actions/checkout@v4
78+
- uses: actions/checkout@v4
7979

80-
- name: Install Linux dependencies
80+
- name: Install Linux dependencies
8181
if: matrix.platform == 'ubuntu-22.04'
8282
run: |
8383
sudo apt-get update
8484
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file \
8585
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
8686
87-
- uses: actions/setup-node@v4
87+
- uses: actions/setup-node@v4
8888
with:
8989
node-version: 20
9090
cache: npm
9191

92-
- uses: dtolnay/rust-toolchain@stable
92+
- uses: dtolnay/rust-toolchain@stable
9393
with:
9494
targets: ${{ matrix.targets }}
9595

96-
- uses: swatinem/rust-cache@v2
96+
- uses: swatinem/rust-cache@v2
9797
with:
9898
workspaces: src-tauri
9999
key: ${{ matrix.name }}
100100

101-
- name: Install frontend dependencies
101+
- name: Install frontend dependencies
102102
run: npm ci
103103

104-
- name: Build & publish release
104+
- name: Build & publish release
105105
uses: tauri-apps/tauri-action@v0
106106
env:
107107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -111,7 +111,7 @@ jobs:
111111
tagName: v__VERSION__
112112
releaseName: "Ognom v__VERSION__"
113113
releaseBody: |
114-
## Ognom the free, no-nonsense MongoDB client
114+
## Ognom - the free, no-nonsense MongoDB client
115115
116116
Download the build for your platform below. Existing installs
117117
update themselves automatically.

CLAUDE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Ognom - project instructions
2+
3+
## Writing style (hard rule)
4+
5+
- Never use em dashes (U+2014) or en dashes (U+2013) anywhere: not in
6+
code, comments, UI strings, docs, commit messages, or chat replies. Use a
7+
plain hyphen "-" (with spaces around it when used as a clause break), a
8+
comma, or a colon instead.
9+
- When editing existing text that contains an em dash, replace it with a
10+
plain "-".
11+
12+
## Design system
13+
14+
- The visual design lives in `../ognom-design-system` (theme-kit.css,
15+
ognom-app.css, console-reference.html, logo-sheet.html, logo/).
16+
- The app's `src/styles/theme-kit.css` and `src/styles/ognom-app.css` are the
17+
in-repo copies of that contract. Components read only the tokens
18+
(`--bg`, `--panel`, `--accent`, `--row`, ...) - never literal colours.
19+
- Two attributes on `<html>` drive everything: `data-theme` and `data-density`.
20+
- The mark is `<OgnomMark />` (`src/components/brand/OgnomMark.tsx`) and always
21+
paints with `currentColor`; in-app it sits on `var(--accent)`.
22+
23+
## Product scope
24+
25+
- No AI / Studio / "Terminator" features. Do not reintroduce OpenAI or any
26+
LLM provider settings.
27+
- Connections can be flagged `production`; a production workspace opens
28+
read-only and the user must switch to edit mode explicitly.
29+
- Destructive multi-document deletes offer an optional JSON backup first;
30+
dropping a collection requires typing its name and offers an optional
31+
export.

MONGODB_SHELL_SYNTAX.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Ognom shell syntax
22

33
The shell tab (and the filter / sort / projection boxes, and the document
4-
editor) understand mongosh-flavored syntax not just strict JSON.
4+
editor) understand mongosh-flavored syntax - not just strict JSON.
55

66
Everything below is parsed **string-aware**: helper syntax inside your string
77
data is never rewritten.
@@ -14,7 +14,7 @@ One statement per run. Comments (`//` and `/* */`) are allowed anywhere.
1414
db.users.find({ role: "admin" }, { name: 1 }).sort({ createdAt: -1 }).skip(10).limit(5)
1515
db.users.findOne({ _id: ObjectId("507f1f77bcf86cd799439011") })
1616
db.orders.aggregate([
17-
{ $match: { status: "paid" } }, // unquoted keys, comments fine
17+
{ $match: { status: "paid" } }, // unquoted keys, comments - fine
1818
{ $group: { _id: "$category", n: { $sum: 1 } } },
1919
])
2020
db.users.countDocuments({ active: true })
@@ -23,10 +23,10 @@ db.users.distinct("country", { active: true })
2323

2424
db.users.insertOne({ name: "Ada", joined: ISODate() })
2525
db.users.insertMany([{ a: 1 }, { a: 2 }])
26-
db.users.updateOne({ _id: ObjectId("") }, { $set: { active: false } })
26+
db.users.updateOne({ _id: ObjectId("...") }, { $set: { active: false } })
2727
db.users.updateMany({ active: false }, { $set: { archived: true } }, { upsert: false })
28-
db.users.replaceOne({ _id: ObjectId("") }, { name: "Replaced" })
29-
db.users.deleteOne({ _id: ObjectId("") })
28+
db.users.replaceOne({ _id: ObjectId("...") }, { name: "Replaced" })
29+
db.users.deleteOne({ _id: ObjectId("...") })
3030
db.users.deleteMany({ archived: true })
3131

3232
db.users.getIndexes()
@@ -59,8 +59,8 @@ capped at **500**.
5959

6060
### Updates
6161

62-
`updateOne` / `updateMany` require operator documents (`{ $set: }`). For a
63-
full replacement use `replaceOne` this mirrors mongosh and prevents
62+
`updateOne` / `updateMany` require operator documents (`{ $set: ... }`). For a
63+
full replacement use `replaceOne` - this mirrors mongosh and prevents
6464
accidental document clobbering.
6565

6666
## Value syntax (JSON5 + helpers)
@@ -85,19 +85,27 @@ accidental document clobbering.
8585
}
8686
```
8787

88-
Whole numbers are stored as integers (Int32/Int64), fractional as doubles
88+
Whole numbers are stored as integers (Int32/Int64), fractional as doubles -
8989
the same heuristic mongosh uses. Use `NumberLong` / `NumberDecimal` / `Double`
9090
to force a type.
9191

9292
### Display
9393

9494
Results render as relaxed Extended JSON with shell-style affordances:
95-
`ObjectId()` pills, ISO dates, typed colors in both the JSON tree and the
95+
`ObjectId(...)` pills, ISO dates, typed colors in both the JSON tree and the
9696
table. *Copy as shell* produces text that pastes straight back into mongosh
9797
or this shell; *Copy as Extended JSON* produces strict JSON.
9898

9999
## Not supported (yet)
100100

101101
- Multiple statements per run, variables, or arbitrary JavaScript
102-
- Regex literals (`/abc/i`) use `{ $regex: "abc", $options: "i" }`
102+
- Regex literals (`/abc/i`) - use `{ $regex: "abc", $options: "i" }`
103103
- `findOneAndUpdate` family, bulk operations, transactions
104+
105+
## Regular expressions and dates
106+
107+
- `/pattern/flags` literals work anywhere a value is expected: `{ topic: /hello/i }`.
108+
- `new RegExp("pattern", "flags")` and `RegExp("pattern")` are accepted too, with JavaScript
109+
string escaping (`"\\d+"`), and become `$regularExpression`.
110+
- `new Date("2024-01-15")`, `Date("...")`, `new Date(1700000000000)` and `ISODate(...)` all
111+
produce a BSON date. Any helper may be prefixed with `new`.

0 commit comments

Comments
 (0)