From 63a1774c5763f9433b866d7e398edb5046071091 Mon Sep 17 00:00:00 2001 From: Shiv Shankar Tiwari Date: Fri, 24 Jul 2026 18:30:16 +0530 Subject: [PATCH] chore: add Gemini Code Assist PR review config Configure the free Gemini Code Assist GitHub App to auto-review PRs: - .gemini/config.yaml: medium+ severity, summary on open, ignore generated/vendored/binary files (Pods, node_modules, lockfiles, screenshots, pbxproj). - .gemini/styleguide.md: project conventions (offline-only, native preview/no WebView, static safe-area insets, schema-driven form, persist-on-navigation, no inline styles) so reviews match how we work. Requires the one-time Marketplace install of the Gemini Code Assist app. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gemini/config.yaml | 27 +++++++++++++++++++++++++++ .gemini/styleguide.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .gemini/config.yaml create mode 100644 .gemini/styleguide.md diff --git a/.gemini/config.yaml b/.gemini/config.yaml new file mode 100644 index 0000000..e1c2b3c --- /dev/null +++ b/.gemini/config.yaml @@ -0,0 +1,27 @@ +# Gemini Code Assist — PR review configuration +# Docs: https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github +have_fun: false + +code_review: + disable: false + # Only surface issues that matter; avoid nitpick noise. + comment_severity_threshold: MEDIUM + # No cap on the number of inline comments. + max_review_comments: -1 + pull_request_opened: + help: false + summary: true + code_review: true + +# Don't review generated / vendored / binary files. +ignore_patterns: + - "**/node_modules/**" + - "ios/Pods/**" + - "ios/build/**" + - "**/build/**" + - "**/*.lock" + - "yarn.lock" + - "package-lock.json" + - "ios/fastlane/screenshots/**" + - "**/*.png" + - "**/*.pbxproj" diff --git a/.gemini/styleguide.md b/.gemini/styleguide.md new file mode 100644 index 0000000..2666a7e --- /dev/null +++ b/.gemini/styleguide.md @@ -0,0 +1,30 @@ +# SnapBiodata — review style guide + +Gemini Code Assist: review PRs against the conventions below. Focus on +correctness, then simplicity and consistency. Keep feedback concise and +actionable; skip subjective style nits already handled by ESLint/Prettier. + +## Stack +- React Native 0.81 (New Architecture / bridgeless) + Expo 54 modules, TypeScript, Yarn. +- Builds/submits via **EAS** (`yarn eas:build:*`, `yarn eas:submit:*`); Fastlane is only for App Store screenshots/metadata. +- Fully **offline, on-device** app — no backend, no accounts. Flag any code that adds network calls or remote data dependencies for the core flow. + +## Architecture (keep these invariants) +- The biodata field schema in `src/data/biodata.ts` is the single source of truth for the form, the native preview, and the PDF. New fields go there, not hard-coded in screens. +- The on-screen preview is rendered **natively** (`src/components/BiodataDocument.tsx`). HTML (`src/templates/html.ts`) is used **only** for the expo-print PDF. The app ships **zero WebViews** — flag any reintroduction of `react-native-webview` in app code. +- Safe-area insets are provided statically via `SafeAreaInsetsContext` in `App.tsx` (NOT ``, which crashes on launch under the new architecture). Do not reintroduce `SafeAreaProvider`. +- Drafts persist to AsyncStorage on **navigation**, not per keystroke (avoids a read-modify-write race). Preserve that. + +## Conventions +- TypeScript: no `any`; type component props explicitly. +- Styling: use `StyleSheet.create`; avoid inline style object literals in JSX (ESLint `react-native/no-inline-styles`). Pass dynamic values as variables. +- Responsive: screens cap content to `MAX_CONTENT_WIDTH` (`src/theme.ts`) and center it so layouts read well on iPad. +- Accessibility: interactive elements need `accessibilityRole` and `accessibilityLabel`. +- npm scripts follow `::` with colons (e.g. `eas:build:ios:production`), plus short aliases like `dev`/`staging`/`prod`. + +## Flag as issues +- New network/backend dependency in the core biodata flow. +- Reintroducing WebView or `SafeAreaProvider`. +- Secrets committed (e.g. `*.p8`, `.asc.env`, keystores) — these must stay gitignored. +- Blocking the JS thread, or per-keystroke storage writes. +- Missing error handling around `expo-print` / `expo-image-picker` / AsyncStorage calls.