Skip to content

Commit 2256eb6

Browse files
committed
Merge branch 'refix-75257' of https://github.com/annaweber830/App into refix-75257
2 parents 827087d + 40cfc54 commit 2256eb6

108 files changed

Lines changed: 1814 additions & 895 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: 9 additions & 10 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, mcp__github_inline_comment__create_inline_comment
5+
tools: Glob, Grep, Read, TodoWrite, Bash, BashOutput, KillBash
66
model: inherit
77
---
88

@@ -203,6 +203,7 @@ memo(ReportActionItem, (prevProps, nextProps) =>
203203
1. **First, get the list of changed files and their diffs:**
204204
- Use `gh pr diff` to see what actually changed in the PR
205205
- Focus ONLY on the changed lines, not the entire file
206+
- **CRITICAL**: Only create inline comments on lines that are part of the diff. Do NOT add comments to lines outside the diff, even if they contain violations. Comments on unchanged lines will fail to be created.
206207
2. **For analyzing changed files:**
207208
- **For large files (>5000 lines):** Use the Grep tool to search for specific violation patterns instead of reading the entire file. Focus grep searches on the changed portions shown in the diff.
208209
- **For smaller files:** You may read the full file using the Read tool
@@ -214,7 +215,7 @@ memo(ReportActionItem, (prevProps, nextProps) =>
214215
- `line`: Line number where the issue occurs
215216
- `body`: Concise and actionable description of the violation and fix, following the below Comment Format
216217
6. **Each comment must reference exactly one Rule ID.**
217-
7. **Output must consist exclusively of calls to mcp__github_inline_comment__create_inline_comment in the required format.** No other text, Markdown, or prose is allowed.
218+
7. **Output must consist exclusively of calls to createInlineComment.sh in the required format.** No other text, Markdown, or prose is allowed.
218219
8. **If no violations are found, add a reaction to the PR**:
219220
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.
220221
9. **Add reaction if and only if**:
@@ -230,15 +231,13 @@ memo(ReportActionItem, (prevProps, nextProps) =>
230231

231232
## Tool Usage Example
232233

233-
For each violation, call the mcp__github_inline_comment__create_inline_comment tool like this.
234-
CRITICAL: **DO NOT** use the Bash tool for inline comments:
234+
For each violation, call the createInlineComment.sh script like this:
235235

236+
```bash
237+
createInlineComment.sh 'src/components/ReportActionsList.tsx' '<Body of the comment according to the Comment Format>' 128
236238
```
237-
mcp__github_inline_comment__create_inline_comment:
238-
path: 'src/components/ReportActionsList.tsx'
239-
line: 128
240-
body: '<Body of the comment according to the Comment Format>'
241-
```
239+
240+
**IMPORTANT**: Always use single quotes around the body argument to properly handle special characters and quotes.
242241

243242
If ZERO violations are found, use the Bash tool to add a reaction to the PR body:
244243

@@ -258,4 +257,4 @@ addPrReaction.sh <PR_NUMBER>
258257
<Suggested, specific fix preferably with a code snippet>
259258
```
260259

261-
**CRITICAL**: You must actually call the mcp__github_inline_comment__create_inline_comment tool for each violation. Don't just describe what you found - create the actual inline comments!
260+
**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/commands/review-code-pr.md

Lines changed: 1 addition & 1 deletion
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:*),mcp__github_inline_comment__create_inline_comment
2+
allowed-tools: Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(addPrReaction.sh:*),Bash(createInlineComment.sh:*)
33
description: Review a code contribution pull request
44
---
55

.claude/scripts/addPrReaction.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ if [[ $# -lt 1 ]] || ! [[ "$1" =~ ^[0-9]+$ ]]; then
88
exit 1
99
fi
1010

11-
PR_NUMBER="$1"
12-
REPO="${GITHUB_REPOSITORY}"
11+
readonly PR_NUMBER="$1"
12+
readonly REPO="${GITHUB_REPOSITORY}"
1313

1414
gh api -X POST "/repos/$REPO/issues/$PR_NUMBER/reactions" -f content="+1"
1515

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/bin/bash
2+
3+
# Secure proxy script to create an inline comment on a GitHub PR.
4+
set -eu
5+
6+
readonly ALLOWED_RULES_FILE="${GITHUB_WORKSPACE}/.claude/allowed-rules.txt"
7+
8+
# Print error and exit.
9+
die() {
10+
echo "Error: $*" >&2
11+
exit 1
12+
}
13+
14+
# Usage helper to avoid repeated text.
15+
usage() {
16+
die "Usage: $0 <path> <body> <line>"
17+
}
18+
19+
COMMENT_STATUS_REASON=""
20+
21+
# Ensure the comment body references an allowed rule tag.
22+
validate_rule() {
23+
local body="$1"
24+
local rule
25+
26+
[[ -f "$ALLOWED_RULES_FILE" ]] || die "Comment rejected: allowed rules file missing at $ALLOWED_RULES_FILE"
27+
28+
rule=$(echo "$body" | grep -oE '[A-Z]+-[0-9]+' | head -1 || true)
29+
[[ -n "$rule" ]] || die "Comment rejected: missing allowed rule reference (e.g. PERF-1)"
30+
31+
if grep -qF "$rule" "$ALLOWED_RULES_FILE"; then
32+
COMMENT_STATUS_REASON="rule $rule validated"
33+
return 0
34+
fi
35+
36+
die "Comment rejected: rule $rule not present in allowed list"
37+
}
38+
39+
readonly PATH_ARG="${1:-}"
40+
readonly BODY_ARG="${2:-}"
41+
readonly LINE_ARG="${3:-}"
42+
43+
[[ -z "$PR_NUMBER" ]] && die "Environment variable PR_NUMBER is required"
44+
[[ -z "$GITHUB_REPOSITORY" ]] && die "Environment variable GITHUB_REPOSITORY is required"
45+
[[ -z "$PATH_ARG" || -z "$BODY_ARG" || -z "$LINE_ARG" ]] && usage
46+
47+
validate_rule "$BODY_ARG"
48+
echo "Comment approved: $COMMENT_STATUS_REASON"
49+
50+
COMMIT_ID=$(gh api "/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER" --jq '.head.sha')
51+
readonly COMMIT_ID
52+
53+
PAYLOAD=$(jq -n \
54+
--arg body "$BODY_ARG" \
55+
--arg path "$PATH_ARG" \
56+
--argjson line "$LINE_ARG" \
57+
--arg commit_id "$COMMIT_ID" \
58+
'{body: $body, path: $path, line: $line, side: "RIGHT", commit_id: $commit_id}')
59+
readonly PAYLOAD
60+
61+
gh api -X POST "/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/comments" \
62+
--input - <<< "$PAYLOAD" || exit 1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Extract allowed rules from code-inline-reviewer.md
4+
# Rules are in format [PREFIX-NUMBER] where PREFIX is uppercase letters
5+
set -euo pipefail
6+
7+
REVIEWER_FILE="${1:-.claude/agents/code-inline-reviewer.md}"
8+
OUTPUT_FILE="${2:-.claude/allowed-rules.txt}"
9+
10+
if [[ ! -f "$REVIEWER_FILE" ]]; then
11+
echo "Error: Reviewer file not found: $REVIEWER_FILE" >&2
12+
exit 1
13+
fi
14+
15+
# Extract rules in format [CAPS-NUMBER] (e.g., [PERF-1], [SEC-1], [STYLE-1])
16+
# Remove brackets to store as PERF-1, SEC-1, etc.
17+
grep -oE '\[[A-Z]+-[0-9]+\]' "$REVIEWER_FILE" | sed 's/\[\(.*\)\]/\1/' | sort -u > "$OUTPUT_FILE"
18+
19+
if [[ ! -s "$OUTPUT_FILE" ]]; then
20+
echo "Error: No allowed rules found in $REVIEWER_FILE" >&2
21+
exit 1
22+
fi
23+
24+
echo "Extracted allowed rules:"
25+
cat "$OUTPUT_FILE"
26+

.github/workflows/claude-review.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
review:
1717
if: github.event.pull_request.draft != true && !contains(github.event.pull_request.title, 'Revert')
1818
runs-on: ubuntu-latest
19+
env:
20+
PR_NUMBER: ${{ github.event.pull_request.number }}
1921
steps:
2022
- name: Checkout repository
2123
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
@@ -37,6 +39,12 @@ jobs:
3739
run: |
3840
echo "$GITHUB_WORKSPACE/.claude/scripts" >> "$GITHUB_PATH"
3941
42+
- name: Extract allowed rules from code-inline-reviewer.md
43+
run: |
44+
"$GITHUB_WORKSPACE/.github/scripts/extractAllowedRules.sh" \
45+
"$GITHUB_WORKSPACE/.claude/agents/code-inline-reviewer.md" \
46+
"$GITHUB_WORKSPACE/.claude/allowed-rules.txt"
47+
4048
- name: Run Claude Code (code)
4149
if: steps.filter.outputs.code == 'true'
4250
uses: anthropics/claude-code-action@a7e4c51380c42dd89b127f5e5f9be7b54020bc6b # v1.0.21
@@ -46,7 +54,7 @@ jobs:
4654
allowed_non_write_users: "*"
4755
prompt: "/review-code-pr REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }}"
4856
claude_args: |
49-
--allowedTools "Task,Glob,Grep,Read,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(addPrReaction.sh:*),mcp__github_inline_comment__create_inline_comment"
57+
--allowedTools "Task,Glob,Grep,Read,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(addPrReaction.sh:*),Bash(createInlineComment.sh:*)"
5058
5159
- name: Run Claude Code (docs)
5260
if: steps.filter.outputs.docs == 'true'

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009027408
118-
versionName "9.2.74-8"
117+
versionCode 1009027500
118+
versionName "9.2.75-0"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

desktop/main.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,28 @@ import log from 'electron-log';
77
import {autoUpdater} from 'electron-updater';
88
import type {AuthType, PermissionType} from 'node-mac-permissions';
99
import {machineId} from 'node-machine-id';
10+
import type {ValueOf} from 'type-fest';
1011
import checkForUpdates from '@libs/checkForUpdates';
1112
import {translate} from '@libs/Localize';
1213
import Log from '@libs/Log';
1314
import CONFIG from '@src/CONFIG';
1415
import CONST from '@src/CONST';
1516
import IntlStore from '@src/languages/IntlStore';
1617
import type {TranslationPaths} from '@src/languages/types';
17-
import type {LocationPermissionState} from '@src/libs/getCurrentPosition/locationPermission';
18-
import {LOCATION_PERMISSION_STATES} from '@src/libs/getCurrentPosition/locationPermission';
1918
import type PlatformSpecificUpdater from '@src/setup/platformSetup/types';
2019
import type {Locale} from '@src/types/onyx';
2120
import type {CreateDownloadQueueModule, DownloadItem} from './createDownloadQueue';
2221
import serve from './electron-serve';
2322
import ELECTRON_EVENTS from './ELECTRON_EVENTS';
2423

24+
const LOCATION_PERMISSION_STATES = {
25+
GRANTED: 'granted',
26+
DENIED: 'denied',
27+
PROMPT: 'prompt',
28+
} as const;
29+
30+
type LocationPermissionState = ValueOf<typeof LOCATION_PERMISSION_STATES>;
31+
2532
const createDownloadQueue = require<CreateDownloadQueueModule>('./createDownloadQueue').default;
2633

2734
const port = process.env.PORT ?? 8082;

ios/NewExpensify/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<key>CFBundlePackageType</key>
2424
<string>APPL</string>
2525
<key>CFBundleShortVersionString</key>
26-
<string>9.2.74</string>
26+
<string>9.2.75</string>
2727
<key>CFBundleSignature</key>
2828
<string>????</string>
2929
<key>CFBundleURLTypes</key>
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.2.74.8</string>
47+
<string>9.2.75.0</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

0 commit comments

Comments
 (0)