Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/docstring-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docstring coverage

on:
pull_request:
branches:
- dev
- staging
- main
push:
branches:
- dev
- staging
- main

jobs:
docstring-coverage:
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@v4

- name: Cache Yarn dependencies
uses: ./.github/actions/cache-yarn
with:
path: |
.yarn/cache
node_modules
*/node_modules
packages/*/node_modules
cache-version: v1

- name: Install dependencies
uses: ./.github/actions/yarn-install

- name: Generate docstring coverage reports
run: |
yarn docstrings:app > /tmp/docstrings-app.log
yarn docstrings:sdk > /tmp/docstrings-sdk.log
yarn docstrings:report
echo "::group::Mobile app coverage (tail)"
tail -n 25 /tmp/docstrings-app.log || true
echo "::endgroup::"
echo "::group::Mobile SDK coverage (tail)"
tail -n 25 /tmp/docstrings-sdk.log || true
echo "::endgroup::"

- name: Upload coverage snapshots
uses: actions/upload-artifact@v4
with:
name: docstring-coverage
path: |
docs/coverage/*.json
if-no-files-found: warn
12 changes: 7 additions & 5 deletions app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1194.0)
aws-sdk-core (3.239.2)
aws-partitions (1.1196.0)
aws-sdk-core (3.240.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
Expand All @@ -34,7 +34,7 @@ GEM
aws-sdk-kms (1.118.0)
aws-sdk-core (~> 3, >= 3.239.1)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.206.0)
aws-sdk-s3 (1.208.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand All @@ -43,7 +43,7 @@ GEM
babosa (1.0.4)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
bigdecimal (4.0.1)
claide (1.1.0)
cocoapods (1.16.2)
addressable (~> 2.8)
Expand Down Expand Up @@ -229,7 +229,8 @@ GEM
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (5.27.0)
minitest (6.0.0)
prism (~> 1.5)
molinillo (0.8.0)
multi_json (1.18.0)
multipart-post (2.4.1)
Expand All @@ -244,6 +245,7 @@ GEM
optparse (0.8.1)
os (1.1.4)
plist (3.7.2)
prism (1.7.0)
public_suffix (4.0.7)
racc (1.8.1)
rake (13.3.1)
Expand Down
14 changes: 14 additions & 0 deletions app/docs/DOCSTRING_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Mobile app docstring style guide

Docstrings for the React Native app live alongside the source in `app/src`. We follow [TSDoc](https://tsdoc.org) conventions so that typed tooling can generate consistent API documentation.

## Authoring guidelines

- Document every exported component, hook, utility, or type alias with a leading `/** ... */` block written in the imperative mood.
- Include `@param`, `@returns`, and `@remarks` tags when they improve clarity, especially for side-effects or platform-specific behaviour.
- Keep examples concise. Prefer inline code blocks for short snippets and use fenced blocks only when you need multiple lines.
- Mention platform differences explicitly (for example, “iOS only”) so consumers understand the scope of the implementation.

## Coverage expectations

Docstring coverage is now monitored through `yarn docstrings:app` and the aggregate `yarn docstrings:report`. The GitHub Actions workflow uploads JSON snapshots from `docs/coverage/*.json`, but coverage targets are not enforced yet—missing docstrings will not block builds. Treat the reports as guardrails and follow up in subsequent PRs if you need to land behaviour quickly.
8 changes: 4 additions & 4 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,7 @@ PODS:
- ReactCommon/turbomodule/core
- Sentry/HybridSDK (= 8.53.2)
- Yoga
- RNSVG (15.15.0):
- RNSVG (15.15.1):
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -2151,9 +2151,9 @@ PODS:
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- RNSVG/common (= 15.15.0)
- RNSVG/common (= 15.15.1)
- Yoga
- RNSVG/common (15.15.0):
- RNSVG/common (15.15.1):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -2635,7 +2635,7 @@ SPEC CHECKSUMS:
RNReactNativeHapticFeedback: e526ac4a7ca9fb23c7843ea4fd7d823166054c73
RNScreens: 806e1449a8ec63c2a4e4cf8a63cc80203ccda9b8
RNSentry: 6ad982be2c8e32dab912afb4132b6a0d88484ea0
RNSVG: 39476f26bbbe72ffe6194c6fc8f6acd588087957
RNSVG: 8cd7dadbe9bdc7d70872910dbe611c8e0f4597bb
segment-analytics-react-native: a0c29c75ede1989118b50cac96b9495ea5c91a1d
Sentry: 59993bffde4a1ac297ba6d268dc4bbce068d7c1b
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Expand Down
5 changes: 2 additions & 3 deletions app/metro.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ const config = {
],

transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
babelTransformerPath:
require.resolve('react-native-svg-transformer/react-native'),
disableImportExportTransform: true,
inlineRequires: true,
},
Expand Down
6 changes: 4 additions & 2 deletions app/src/screens/app/ModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ const ModalBackDrop = styled(View, {
height: '100%',
});

export interface ModalNavigationParams
extends Omit<ModalParams, 'onButtonPress' | 'onModalDismiss'> {
export interface ModalNavigationParams extends Omit<
ModalParams,
'onButtonPress' | 'onModalDismiss'
> {
callbackId: number;
}

Expand Down
5 changes: 2 additions & 3 deletions app/src/services/points/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ export const getWhiteListedDisclosureAddresses = async (): Promise<
export const hasUserAnIdentityDocumentRegistered =
async (): Promise<boolean> => {
try {
const { loadDocumentCatalogDirectlyFromKeychain } = await import(
'@/providers/passportDataProvider'
);
const { loadDocumentCatalogDirectlyFromKeychain } =
await import('@/providers/passportDataProvider');
const catalog = await loadDocumentCatalogDirectlyFromKeychain();

return catalog.documents.some(doc => doc.isRegistered === true);
Expand Down
10 changes: 4 additions & 6 deletions app/src/stores/pointEventStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,10 @@ export const usePointEventStore = create<PointEventState>()((set, get) => ({

loadDisclosureEvents: async () => {
try {
const { getDisclosurePointEvents } = await import(
'@/services/points/getEvents'
);
const { useProofHistoryStore } = await import(
'@/stores/proofHistoryStore'
);
const { getDisclosurePointEvents } =
await import('@/services/points/getEvents');
const { useProofHistoryStore } =
await import('@/stores/proofHistoryStore');
await useProofHistoryStore.getState().initDatabase();
const disclosureEvents = await getDisclosurePointEvents();
const existingEvents = get().events.filter(e => e.type !== 'disclosure');
Expand Down
Loading
Loading