Skip to content

Commit f963dcb

Browse files
committed
Merge branch 'main' of https://github.com/annaweber830/App into fix-76923
2 parents bdffe1f + b519262 commit f963dcb

1,971 files changed

Lines changed: 76666 additions & 109603 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.

.claude/agents/code-inline-reviewer.md

Lines changed: 16 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name: code-inline-reviewer
44
description: Reviews code and creates inline comments for specific rule violations.
5-
tools: Glob, Grep, Read, TodoWrite, Bash, BashOutput, KillBash
5+
tools: Glob, Grep, Read, Bash, BashOutput
66
model: inherit
77
---
88

@@ -41,49 +41,25 @@ Each rule file contains:
4141
- **For large files (>5000 lines):** Use the Grep tool with Search Patterns from each rule's Review Metadata to locate potential violations. Focus on changed portions shown in the diff.
4242
- **For smaller files:** You may read the full file using the Read tool
4343
- **If a Read fails with token limit error:** Immediately switch to using Grep with targeted patterns for the rules you're checking
44-
- For each rule: evaluate the Condition and "DO NOT flag" exceptions. Mark the rule as checked on the checklist. A single rule **can produce multiple violations** — flag each separately.
45-
5. **For each violation found, immediately create an inline comment** using the available GitHub inline comment tool. Do not batch — create the comment as soon as you confirm a violation.
46-
6. **Required parameters for each inline comment:**
47-
- `path`: Full file path (e.g., "src/components/ReportActionsList.tsx")
44+
3. **Search strategy for large files:** Use the search patterns defined in each rule's "Search patterns" field to efficiently locate potential violations with Grep.
45+
4. **Return your findings as structured JSON output.** Your response must be a JSON object matching this schema:
46+
```json
47+
{ "violations": [ { "ruleId": "...", "path": "...", "line": ..., "body": "..." } ] }
48+
```
49+
- `ruleId`: The rule ID (e.g., `PERF-1`, `CONSISTENCY-2`)
50+
- `path`: Full file path (e.g., `src/components/ReportActionsList.tsx`)
4851
- `line`: Line number where the issue occurs
49-
- `body`: Concise and actionable description of the violation and fix, following the below Comment Format
50-
7. **Each comment must reference exactly one Rule ID.**
51-
8. **Output must consist exclusively of calls to createInlineComment.sh in the required format.** No other text, Markdown, or prose is allowed.
52-
9. **If no violations are found, add a reaction to the PR**:
53-
Add a +1 reaction to the PR using the `addPrReaction` script (available in PATH from `.claude/scripts/`). The script takes ONLY the PR number as argument - it always adds a "+1" reaction, so do NOT pass any reaction type or emoji.
54-
10. **Add reaction if and only if**:
55-
- You examined EVERY changed line in EVERY changed file (via diff + targeted grep/read)
56-
- You checked EVERY changed file against ALL rules
57-
- You found ZERO violations matching the exact rule criteria
58-
- You verified no false negatives by checking each rule systematically
59-
If you found even ONE violation or have ANY uncertainty do NOT add the reaction - create inline comments instead.
60-
11. **DO NOT invent new rules, stylistic preferences, or commentary outside the listed rules.**
61-
12. **DO NOT describe what you are doing, create comments with a summary, explanations, extra content, comments on rules that are NOT violated or ANYTHING ELSE.**
62-
Only inline comments regarding rules violations are allowed. If no violations are found, add a reaction instead of creating any comment.
63-
EXCEPTION: If you believe something MIGHT be a Rule violation but are uncertain, err on the side of creating an inline comment with your concern rather than skipping it.
64-
13. **Reality check before posting**: Before creating each inline comment, re-read the specific code one more time and confirm the violation is real. If upon re-reading you realize the code is actually correct, **do NOT post the comment** — silently skip it and move on. Never post a comment that flags a violation and then concludes it is not actually a problem.
65-
66-
## Tool Usage Example
67-
68-
For each violation, call the createInlineComment.sh script like this:
69-
70-
```bash
71-
createInlineComment.sh 'src/components/ReportActionsList.tsx' '<Body of the comment according to the Comment Format>' 128
72-
```
73-
74-
**IMPORTANT**: Always use single quotes around the body argument to properly handle special characters and quotes.
75-
76-
If ZERO violations are found, use the Bash tool to add a reaction to the PR body:
77-
78-
```bash
79-
addPrReaction.sh <PR_NUMBER>
80-
```
81-
82-
**IMPORTANT**: Always use the `addPrReaction.sh` script (available in PATH from `.claude/scripts/`) instead of calling `gh api` directly.
52+
- `body`: Concise and actionable description of the violation and fix, formatted per the Comment Format below
53+
5. **Each violation must reference exactly one Rule ID.**
54+
6. **If no violations are found, return an empty violations array:** `{ "violations": [] }`
55+
7. **Do NOT post comments, call scripts, or add reactions.** Only return the structured JSON.
56+
8. **DO NOT invent new rules, stylistic preferences, or commentary outside the listed rules.**
57+
9. **DO NOT describe what you are doing or add extra content.**
58+
EXCEPTION: If you believe something MIGHT be a Rule violation but are uncertain, err on the side of including it in the violations array rather than skipping it.
8359

8460
## Comment Format
8561

86-
Build the docs link by mapping the ruleId to its rule filename:
62+
Use this format for the `body` field of each violation:
8763

8864
```
8965
### ❌ <Rule ID> [(docs)](https://github.com/Expensify/App/blob/main/.claude/skills/coding-standards/rules/<rule-filename>.md)
@@ -92,8 +68,3 @@ Build the docs link by mapping the ruleId to its rule filename:
9268
9369
<Suggested, specific fix preferably with a code snippet>
9470
```
95-
96-
For example, a PERF-1 violation links to:
97-
`https://github.com/Expensify/App/blob/main/.claude/skills/coding-standards/rules/perf-1-no-spread-in-renderitem.md`
98-
99-
**CRITICAL**: You must actually call the createInlineComment.sh script for each violation. Don't just describe what you found - create the actual inline comments!

.claude/agents/helpdot-inline-reviewer.md

Lines changed: 16 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,25 @@ model: inherit
99

1010
You are **Support Doc Optimizer** — an AI trained to evaluate HelpDot articles written for Expensify and create inline comments for specific violations.
1111

12-
Your job is to scan through changed documentation files and create **inline comments** for specific violations based on the three core criteria below.
12+
Your job is to scan through changed documentation files and create **inline comments** for specific violations. **All rules and criteria come from the help site governance files** — you must use them as the single source of truth.
13+
14+
## Governance (source of truth)
15+
16+
**Before reviewing, read these files and use them as the authoritative source for all rules and violations:**
17+
18+
1. **docs/HELPSITE_NAMING_CONVENTIONS.md** — UI referencing (buttons, tabs, menus, navigation), button/tab naming standards, three dots menu rule, navigation instructions, prohibited language, deterministic writing.
19+
2. **docs/HELP_AUTHORING_GUIDELINES.md** — Article structure, heading rules, metadata requirements, step formatting, AI retrieval optimization, cross-linking, screenshot placeholders, pre-publish validation.
20+
3. **docs/TEMPLATE.md** — Required YAML frontmatter pattern, heading guidance, FAQ structure, and structural expectations.
21+
22+
Create inline comments for any violation of the rules defined in those governance files. When in doubt, the governance docs override any other guidance.
1323

1424
**CRITICAL — Review only the proposed changes:** You must evaluate and comment only on the **diff** (the lines added or modified in the PR). Do NOT create inline comments on lines that are unchanged—those belong to the old file and are not part of the proposal. Use `gh pr diff` to know exactly which lines were changed; only create comments on those line numbers. Commenting on unchanged lines is out of scope and can fail or confuse the author.
1525

16-
## 1. Readability Violations (Create inline comments for)
17-
- Poor sentence clarity, grammar, or scannability issues
18-
- Illogical flow or ordering of sections
19-
- Reading level above 8th grade (complex jargon)
20-
- Unnecessary filler or verbose language
21-
- Incorrect use of numbered steps or bullet points
22-
23-
## 2. AI Readiness Violations (Create inline comments for)
24-
- Vague headings without full feature names (e.g., "Enable it", "Connect to it")
25-
- Short or generic headings instead of full task phrasing (e.g., "Options" → "Expense Rule options for Workspace Admins"; use the full task and audience in the heading)
26-
- Non-descriptive headings (e.g., "Where to find it" vs "Where to find Statement Matching")
27-
- Vague references like "this," "that," or "it" without clear context
28-
- Missing or incomplete YAML metadata:
29-
```yaml
30-
---
31-
title: [Full article title]
32-
description: [Concise, benefit-focused summary]
33-
keywords: [feature name, related terms, navigation path, etc.]
34-
internalScope: Audience is [target role]. Covers [main topic]. Does not cover [excluded areas].
35-
---
36-
```
37-
- **internalScope** must always be present. If the article does not specify it, use a clear default following the pattern: `Audience is [target role]. Covers [main topic]. Does not cover [excluded areas].`
38-
- Wrong heading levels (using ### or deeper instead of # or ##)
39-
40-
**Note:** A breadcrumb path after the H1 heading is **not** required. Do not flag missing breadcrumbs as a violation.
41-
42-
## 3. Expensify Style Compliance Violations (Create inline comments for)
43-
- Voice and tone issues:
44-
- Not casual yet professional
45-
- Excessive exclamation marks (max 1 per 400 words)
46-
- Terminology violations:
47-
- "Policy" instead of "Workspace"
48-
- "User" instead of "Member"
49-
- Wrong role names (not "Workspace Admin," "Domain Owner")
50-
- Button label violations:
51-
- "Continue" instead of "Next"
52-
- "Save" instead of "Confirm" at end of flows
53-
- Markdown formatting violations
54-
- FAQ structure violations:
55-
- Not using "# FAQ" as heading
56-
- Questions not using ## subheadings
57-
- Answers not in plain text
26+
### Violation categories (aligned with governance)
27+
28+
- **Readability / structure:** Clarity, flow, scannability, step formatting, heading hierarchy — per HELP_AUTHORING_GUIDELINES.md and TEMPLATE.md.
29+
- **AI readiness:** Task-based headings, full feature names, YAML metadata (title, description, keywords, **internalScope**), no generic headings — per HELP_AUTHORING_GUIDELINES.md and TEMPLATE.md. (Breadcrumb paths after H1 are not required; do not flag their absence.)
30+
- **Naming and style:** Exact UI labels, button/tab naming, terminology (e.g. Workspace not Policy, Member not User), navigation phrasing, prohibited language — per HELPSITE_NAMING_CONVENTIONS.md and HELP_AUTHORING_GUIDELINES.md. FAQ must use `# FAQ` and ## for questions per TEMPLATE.md.
5831

5932
## Instructions
6033

.claude/agents/helpdot-summary-reviewer.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,30 @@ model: inherit
99

1010
You are a documentation quality specialist that provides comprehensive assessments of HelpDot documentation changes.
1111

12-
Your job is to analyze all changed files and provide a single, comprehensive summary review with scores and overall recommendations.
12+
Your job is to analyze all changed files and provide a single, comprehensive summary review with scores and overall recommendations. **All scoring criteria and rules come from the help site governance files** — use them as the single source of truth.
13+
14+
## Governance (source of truth)
15+
16+
**Before reviewing, read these files and use them as the authoritative source for scoring and recommendations:**
17+
18+
1. **docs/HELPSITE_NAMING_CONVENTIONS.md** — UI referencing, button/tab naming, navigation rules, prohibited language.
19+
2. **docs/HELP_AUTHORING_GUIDELINES.md** — Structure, heading rules, metadata, steps, AI retrieval, cross-linking, validation checklist.
20+
3. **docs/TEMPLATE.md** — YAML frontmatter, heading guidance, FAQ structure.
1321

1422
**CRITICAL — Review only the proposed changes:** Base your assessment, scores, and recommendations **only on the changes being proposed** in the PR (the diff). Use `gh pr diff` to see what was added or modified. Do not score or critique unchanged portions of the file—those are from the old version and are not part of the proposal. Evaluate and feedback only on the diff.
1523

1624
## Scoring Criteria
1725

18-
### 1. Readability (1-10)
19-
- Sentence clarity and grammar
20-
- Logical flow and organization
21-
- Appropriate reading level (8th grade or below)
22-
- Clear, jargon-free language
23-
- Proper use of formatting elements
26+
Derive your scores from the governance files above:
2427

25-
### 2. AI Readiness (1-10)
26-
- Descriptive headings with full feature names and full task phrasing (e.g., "Expense Rule options for Workspace Admins" not "Options")
27-
- Clear context without vague references
28-
- Proper YAML metadata structure, including **internalScope** in the form: `Audience is [target role]. Covers [main topic]. Does not cover [excluded areas].` (use a clear default if not provided)
29-
- Consistent heading hierarchy (# and ## only)
28+
### 1. Readability (1-10)
29+
- Sentence clarity, flow, scannability, step formatting — per HELP_AUTHORING_GUIDELINES.md and TEMPLATE.md.
3030

31-
**Note:** Breadcrumb paths after H1 are not required; do not penalize for their absence.
31+
### 2. AI Readiness (1-10)
32+
- Task-based headings, full feature names, YAML metadata (including **internalScope**), heading hierarchy (# and ## only) — per HELP_AUTHORING_GUIDELINES.md and TEMPLATE.md. (Breadcrumb paths after H1 are not required; do not penalize for their absence.)
3233

3334
### 3. Style Compliance (1-10)
34-
- Expensify voice and tone standards
35-
- Correct terminology (workspace, member, etc.)
36-
- Proper button labels and UI terms
37-
- Markdown formatting compliance
38-
- FAQ structure adherence
35+
- Exact UI terminology, button/tab naming, terminology (e.g. Workspace, Member), navigation phrasing, FAQ structure — per HELPSITE_NAMING_CONVENTIONS.md and HELP_AUTHORING_GUIDELINES.md.
3936

4037
## Output Format
4138

.claude/commands/review-code-pr.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
allowed-tools: Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(addPrReaction.sh:*),Bash(createInlineComment.sh:*)
2+
allowed-tools: Bash(gh pr diff:*),Bash(gh pr view:*),Bash(check-compiler.sh:*)
33
description: Review a code contribution pull request
44
---
55

@@ -8,10 +8,13 @@ Perform a comprehensive PR review using a specialized subagent:
88
## Inline Review
99
Use the code-inline-reviewer agent to:
1010
- Scan all changed source code files
11-
- Create inline comments for specific review rule violations
12-
- Focus on line-specific, actionable feedback
11+
- Detect review rule violations with line-specific, actionable feedback
1312

14-
Run the agent and ensure its feedback is posted to the PR.
13+
Run the agent. It will return structured JSON with any violations found.
14+
15+
## Output
16+
Return the subagent's violations JSON as your structured output unchanged.
17+
Do NOT post comments or reactions yourself - the workflow handles that.
1518

1619
<important>
1720
Keep feedback concise.

.claude/commands/review-helpdot-pr.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@ allowed-tools: Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),mcp__
33
description: Review a HelpDot documentation pull request
44
---
55

6-
Perform a comprehensive HelpDot documentation review using two specialized subagents:
6+
Perform a comprehensive HelpDot documentation review using two specialized subagents. Both reviewers use the **help site governance files** in the repo as the source of truth for rules and scoring:
7+
8+
- **docs/HELPSITE_NAMING_CONVENTIONS.md** — UI referencing, button/tab naming, navigation
9+
- **docs/HELP_AUTHORING_GUIDELINES.md** — Structure, headings, metadata, AI retrieval, validation
10+
- **docs/TEMPLATE.md** — YAML frontmatter, heading guidance, FAQ structure
711

812
## Step 1: Inline Review
913
Use the helpdot-inline-reviewer agent to:
1014
- Scan all changed documentation files
11-
- Create inline comments for specific HelpDot rule violations
15+
- Create inline comments for violations of the governance rules above
1216
- Focus on line-specific, actionable feedback
1317

1418
## Step 2: Summary Review
1519
Use the helpdot-summary-reviewer agent to:
16-
- Analyze the overall quality of all changes
20+
- Analyze the overall quality of all changes using the governance criteria
1721
- Provide comprehensive assessment with scoring
1822
- Post one top-level PR comment with summary and recommendations
1923

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"hooks": [
77
{
88
"type": "command",
9-
"command": "FILE=$(jq -r '.tool_input.file_path') && [ -f \"$FILE\" ] && ./node_modules/.bin/prettier --experimental-cli --write --ignore-unknown \"$FILE\""
9+
"command": "FILE=$(jq -r '.tool_input.file_path') && [ -f \"$FILE\" ] && ./node_modules/.bin/prettier --experimental-cli --no-cache --write --ignore-unknown \"$FILE\""
1010
}
1111
]
1212
}

.claude/skills/coding-standards/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Coding standards for the Expensify App. Each standard is a standalone file in `r
4444
- [CONSISTENCY-6](rules/consistency-6-proper-error-handling.md) — Proper error handling
4545

4646
### Clean React Patterns
47+
- [CLEAN-REACT-PATTERNS-0](rules/clean-react-0-compiler.md) — React Compiler compliance
4748
- [CLEAN-REACT-PATTERNS-1](rules/clean-react-1-composition-over-config.md) — Composition over configuration
4849
- [CLEAN-REACT-PATTERNS-2](rules/clean-react-2-own-behavior.md) — Components own their behavior
4950
- [CLEAN-REACT-PATTERNS-3](rules/clean-react-3-context-free-contracts.md) — Context-free component contracts

.claude/skills/playwright-app-testing/SKILL.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ When signing in to dev environment:
4141
- **Email**: Generate random Gmail address (e.g., `user+throwaway<random>@gmail.com`)
4242
- **New Account**: Press join to create account
4343
- **Existing Account**: Magic code: Always `000000`
44-
- **Onboarding**: Skip all optional steps
44+
- **Onboarding**: The `SKIP_ONBOARDING` env flag is set to `false` by default in `.env`. When `false`, onboarding screens will appear after sign-in for new accounts. Unless you are specifically asked to test onboarding, update the flag to `true` before starting the dev server so that onboarding is bypassed entirely:
45+
```bash
46+
sed -i '' 's/SKIP_ONBOARDING=false/SKIP_ONBOARDING=true/' .env
47+
```
48+
If you need to test onboarding flows, set it back to `false`:
49+
```bash
50+
sed -i '' 's/SKIP_ONBOARDING=true/SKIP_ONBOARDING=false/' .env
51+
```
52+
You can check the current value with:
53+
```bash
54+
grep SKIP_ONBOARDING .env
55+
```
56+
**Important**: After changing `SKIP_ONBOARDING` in `.env`, the web dev server must be restarted for the change to take effect.
4557

4658
## Example Usage
4759

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SECURE_NGROK_URL=https://secure-expensify-user.ngrok.io/
99
NGROK_URL=https://expensify-user.ngrok.io/
1010
USE_NGROK=false
1111
USE_WEB_PROXY=false
12+
SKIP_ONBOARDING=false
1213
USE_WDYR=false
1314
USE_REDUX_DEVTOOLS=false
1415
CAPTURE_METRICS=false

.github/ISSUE_TEMPLATE/DesignDoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Design Doc tracking issue
33
about: A standard template to follow when leading a project
4-
labels: Daily, NewFeature
4+
labels: Daily, NewFeature, DesignDoc
55
---
66

77
## Proposal

0 commit comments

Comments
 (0)