Skip to content

Commit cf782b4

Browse files
committed
Bump CI action versions and sync CLAUDE.md with code
- Move actions/checkout v4->v6, actions/setup-go v5->v6, actions/upload-artifact v4->v7, and dorny/test-reporter v1->v3 to keep CI on the latest stable majors. All run on Node 24 and remain compatible with the existing workflow inputs. - Correct CLAUDE.md drift: list mock.go in the project tree and the JMAP component, note the JMAPClient interface shared by the real and mock clients, and update the /api/emails reference to describe the InboxInfo response shape (emails, totalCount) and the limit/offset query parameters.
1 parent 345c13c commit cf782b4

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@v5
22+
uses: actions/setup-go@v6
2323
with:
2424
go-version: '1.21'
2525
cache: true
@@ -42,10 +42,10 @@ jobs:
4242

4343
steps:
4444
- name: Checkout code
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
4646

4747
- name: Set up Go
48-
uses: actions/setup-go@v5
48+
uses: actions/setup-go@v6
4949
with:
5050
go-version: '1.21'
5151
cache: true
@@ -74,7 +74,7 @@ jobs:
7474
go tool cover -func=coverage.out | grep -v "total:" | awk '{print "| " $1 " | " $3 " |"}' | sort -u >> $GITHUB_STEP_SUMMARY
7575
7676
- name: Test Report
77-
uses: dorny/test-reporter@v1
77+
uses: dorny/test-reporter@v3
7878
if: always()
7979
with:
8080
name: Go Test Results
@@ -84,7 +84,7 @@ jobs:
8484
fail-on-empty: true
8585

8686
- name: Upload coverage to GitHub
87-
uses: actions/upload-artifact@v4
87+
uses: actions/upload-artifact@v7
8888
with:
8989
name: coverage-report
9090
path: coverage.out

CLAUDE.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ mailboxzero/
3333
│ ├── config/
3434
│ │ └── config.go # Configuration loading and validation
3535
│ ├── jmap/
36-
│ │ ├── client.go # JMAP client implementation
37-
│ │ └── email.go # Email data structures and operations
36+
│ │ ├── client.go # JMAP client implementation and JMAPClient interface
37+
│ │ ├── email.go # Email data structures and operations
38+
│ │ └── mock.go # MockClient with built-in sample data for mock mode
3839
│ ├── server/
3940
│ │ └── server.go # HTTP server and API handlers
4041
│ └── similarity/
@@ -59,12 +60,13 @@ mailboxzero/
5960
- Default similarity threshold
6061

6162
#### 2. JMAP Client (`internal/jmap/`)
62-
- **Files:** `client.go`, `email.go`
63+
- **Files:** `client.go`, `email.go`, `mock.go`
6364
- **Purpose:** Handles communication with Fastmail's JMAP API
6465
- **Features:**
66+
- `JMAPClient` interface implemented by both the real `Client` and the in-memory `MockClient` (selected via `mock_mode` in config)
6567
- Session authentication with Bearer tokens
6668
- Mailbox discovery (inbox, archive)
67-
- Email querying and retrieval with body content
69+
- Email querying and retrieval with body content, including a paginated `GetInboxEmailsWithCountPaginated` used by the `/api/emails` endpoint
6870
- Safe archive operations (move to archive folder)
6971
- Comprehensive error handling
7072

@@ -158,10 +160,10 @@ default_similarity: 75 # Default similarity percentage (0-100)
158160
## API Endpoints
159161
160162
### GET /api/emails
161-
- **Purpose:** Retrieve inbox emails
162-
- **Response:** JSON array of email objects
163-
- **Limit:** 100 emails for performance
164-
- **Fields:** ID, subject, from, preview, receivedAt, bodyValues
163+
- **Purpose:** Retrieve inbox emails (paginated)
164+
- **Query Parameters:** `limit` (default 100) and `offset` (default 0)
165+
- **Response:** JSON object `{ "emails": [...], "totalCount": N }` (`InboxInfo`)
166+
- **Email Fields:** ID, subject, from, preview, receivedAt, bodyValues
165167

166168
### POST /api/similar
167169
- **Purpose:** Find similar emails

0 commit comments

Comments
 (0)