@mushi-mushi/react-native 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +11 -0
- package/README.md +59 -36
- package/package.json +2 -2
package/CONTRIBUTING.md
CHANGED
|
@@ -101,6 +101,17 @@ Releases are fully automated. Maintainers don't run `npm publish` by hand.
|
|
|
101
101
|
|
|
102
102
|
If GitHub's anti-loop protection suppresses the auto re-fire (the squash merge can be attributed to `github-actions[bot]`), trigger the workflow manually: **Actions → release → Run workflow → master**.
|
|
103
103
|
|
|
104
|
+
### Known CI/CD quirks and their automatic safeguards
|
|
105
|
+
|
|
106
|
+
A handful of GitHub-Actions × Changesets edge cases have caused release-pipeline stalls in the past. Each is now caught automatically — keep these in mind when you see the symptom:
|
|
107
|
+
|
|
108
|
+
| Symptom | Root cause | Automatic safeguard |
|
|
109
|
+
| --- | --- | --- |
|
|
110
|
+
| The `Build & Test` required check never registers on the `chore: version packages` PR — the PR stays "Required check missing" forever | `changeset-release/master` is pushed by `github-actions[bot]`. GitHub silently drops the downstream `pull_request` event to prevent bot loops (observed on PR #45, #102, #124). | `ci.yml` now also triggers on `push` to `changeset-release/master`, so `Build & Test` reports against the head commit directly. No empty-commit nudge needed. |
|
|
111
|
+
| Release workflow fails with `No commits between master and changeset-release/master` after merging a PR with a new changeset. | A `.changeset/*.md` file whose YAML frontmatter only targets packages listed in `.changeset/config.json#ignore` (e.g. `@mushi-mushi/server`, `@mushi-mushi/admin`). `changeset version` produces no bumps, the version PR is empty, the next push errors (PR #102 / #121, 2026-05-19). | `pnpm check:changeset-orphans` runs in both `ci.yml` and `release.yml`. PR CI fails with an actionable message naming the orphan file *before* it can reach master. If you legitimately need to record an internal-only change, omit the changeset entirely — the diff lives in git history. |
|
|
112
|
+
| Release workflow's `Audit signatures of installed dependencies` step fails with `npm ETARGET / No matching version found for @mushi-mushi/<pkg>@<ver>` seconds after the publish step succeeded. | npm's registry CDN can take up to ~30s to propagate a freshly-published manifest. The audit step shells out to `npm install` against the just-published version and races the CDN (observed 2026-05-20, run 26149167393). | The audit step retries with exponential backoff (1, 2, 4, 8, 16, 32s — 63s total) before failing. Sigstore signatures are written at publish time, so a one-off audit failure never indicates a corrupted package — `pnpm view <pkg> version` is the ground truth. |
|
|
113
|
+
| Push to `master` after merging a PR doesn't fire the `Release` workflow. | Same anti-loop protection: when a squash merge is attributed to `github-actions[bot]`, GitHub may suppress the downstream `push` trigger. Sporadic — observed twice in the last 60 days. | `release.yml` keeps `workflow_dispatch` as the manual fallback. Recovery: **Actions → Release → Run workflow → master**. The `Build & Verify` job re-runs identically to the auto-fired path. |
|
|
114
|
+
|
|
104
115
|
### Adding a brand-new publishable package
|
|
105
116
|
|
|
106
117
|
Trusted Publisher bindings are configured **per package** on `npmjs.com` and require the package to already exist on the registry. New packages therefore need a one-time bootstrap before OIDC can take over.
|
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# @mushi-mushi/react-native
|
|
2
2
|
|
|
3
|
-
React Native SDK for Mushi Mushi —
|
|
3
|
+
React Native SDK for [Mushi Mushi](https://www.npmjs.com/package/mushi-mushi) — shake-to-report widget, offline queue, and the closed-loop lesson layer for iOS + Android.
|
|
4
4
|
|
|
5
|
-
> **One-command setup:** `npx mushi-mushi` auto-detects React Native / Expo and installs this package.
|
|
5
|
+
> **One-command setup:** `npx mushi-mushi` auto-detects React Native / Expo and installs this package with the right env vars.
|
|
6
6
|
>
|
|
7
|
-
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/svelte`](https://npmjs.com/package/@mushi-mushi/svelte) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor)
|
|
7
|
+
> **Other frameworks:** [`@mushi-mushi/react`](https://npmjs.com/package/@mushi-mushi/react) · [`@mushi-mushi/vue`](https://npmjs.com/package/@mushi-mushi/vue) · [`@mushi-mushi/svelte`](https://npmjs.com/package/@mushi-mushi/svelte) · [`@mushi-mushi/angular`](https://npmjs.com/package/@mushi-mushi/angular) · [`@mushi-mushi/capacitor`](https://npmjs.com/package/@mushi-mushi/capacitor) · [`@mushi-mushi/web`](https://npmjs.com/package/@mushi-mushi/web)
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## What this package adds on mobile
|
|
10
|
+
|
|
11
|
+
Every bug your users feel — a button that won't tap, a screen that freezes, a layout that folds on their device — gets captured, classified by AI, and fed into a lesson library that prevents the same class of mistake in the next PR review and the next AI agent run. That's the closed loop the main [`mushi-mushi`](https://www.npmjs.com/package/mushi-mushi) README describes. This package is the mobile entry point.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
10
14
|
|
|
11
15
|
```tsx
|
|
12
16
|
import { MushiProvider } from '@mushi-mushi/react-native'
|
|
@@ -20,74 +24,93 @@ export default function App() {
|
|
|
20
24
|
}
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
That renders a floating 🐛 button and a slide-up bottom-sheet report form. The button stays out of the way until tapped. Report data — screenshot, route, device context, last 5 seconds of console and network — flows to your admin console and is classified within seconds.
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|-------|----------|
|
|
27
|
-
| `'button'` (default) | Shows floating action button |
|
|
28
|
-
| `'shake'` | Installs a shake-to-report listener (no visible UI) |
|
|
29
|
-
| `'both'` | Floating button + shake listener |
|
|
30
|
-
| `'manual'` / `'hidden'` / `'none'` | No auto-UI — call `open()` programmatically |
|
|
31
|
-
| `'attach'` | Hides the default UI; the host renders its own button and calls `attachTo()` |
|
|
29
|
+
## Widget trigger modes
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
it once with `expo install expo-sensors` (or `npm install expo-sensors`); the
|
|
35
|
-
listener is wired lazily so apps that ship `'button'` only never pay the cost.
|
|
31
|
+
Control how users open the report form:
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
| Value | Behavior |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `'button'` (default) | Floating action button — safe on all Hermes builds |
|
|
36
|
+
| `'shake'` | Shake-to-report listener (requires optional `expo-sensors` peer) |
|
|
37
|
+
| `'both'` | Floating button + shake |
|
|
38
|
+
| `'manual'` / `'hidden'` / `'none'` | No auto UI — call `open()` programmatically |
|
|
39
|
+
| `'attach'` | Hides default UI; host renders its own button and calls `attachTo()` |
|
|
40
|
+
|
|
41
|
+
> **Note on shake + Hermes:** `expo-sensors` is loaded lazily via `require()` so apps that ship `trigger: 'button'` never pay the shake-sensor cost. Both triggers are fully Hermes-compatible as of v0.11.0.
|
|
40
42
|
|
|
41
43
|
```tsx
|
|
42
44
|
<MushiProvider
|
|
43
45
|
projectId="proj_xxx"
|
|
44
46
|
apiKey="mushi_xxx"
|
|
45
47
|
config={{
|
|
46
|
-
widget: {
|
|
48
|
+
widget: {
|
|
49
|
+
trigger: 'both',
|
|
50
|
+
buttonPosition: 'bottom-right',
|
|
51
|
+
inset: { bottom: 96, right: 16 }, // clear your tab bar
|
|
52
|
+
},
|
|
47
53
|
}}
|
|
48
54
|
>
|
|
49
55
|
<Navigation />
|
|
50
56
|
</MushiProvider>
|
|
51
57
|
```
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
## Hooks
|
|
54
60
|
|
|
55
61
|
```ts
|
|
56
62
|
import { useMushi, useMushiReport, useMushiWidget } from '@mushi-mushi/react-native'
|
|
57
63
|
|
|
58
64
|
const { submitReport } = useMushiReport()
|
|
59
65
|
const { open, close } = useMushiWidget()
|
|
66
|
+
const mushi = useMushi() // full SDK instance: show(), hide(), setTrigger(), attachTo()
|
|
60
67
|
```
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
## Headless / bring your own button
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { MushiTrigger } from '@mushi-mushi/react-native'
|
|
73
|
+
|
|
74
|
+
<MushiTrigger>
|
|
75
|
+
<Pressable style={styles.btn}>
|
|
76
|
+
<Text>Report a bug</Text>
|
|
77
|
+
</Pressable>
|
|
78
|
+
</MushiTrigger>
|
|
79
|
+
```
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
`MushiTrigger` wraps any child with `cloneElement` — the child's `onPress` chain is preserved.
|
|
67
82
|
|
|
68
|
-
|
|
83
|
+
## Standalone components
|
|
69
84
|
|
|
70
85
|
```tsx
|
|
71
86
|
import { MushiBottomSheet, MushiFloatingButton } from '@mushi-mushi/react-native'
|
|
72
87
|
```
|
|
73
88
|
|
|
74
|
-
- `MushiBottomSheet` — Conversational
|
|
75
|
-
- `MushiFloatingButton` — Positioned FAB with spring animation. Configurable via `buttonPosition`.
|
|
89
|
+
- `MushiBottomSheet` — Conversational report modal with category → description → submit flow. Dark/light theme, drag-to-dismiss.
|
|
90
|
+
- `MushiFloatingButton` — Positioned FAB with spring animation. Configurable via `buttonPosition` and `inset`.
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
## What gets captured
|
|
78
93
|
|
|
79
|
-
- Device info (platform, OS, screen dimensions)
|
|
80
|
-
- Console logs (monkey-patched)
|
|
81
|
-
- Network requests (fetch interceptor)
|
|
82
|
-
- Navigation events (React Navigation, optional)
|
|
83
|
-
- Offline queue via
|
|
94
|
+
- Device info (platform, OS version, screen dimensions)
|
|
95
|
+
- Console logs (monkey-patched `console.*`)
|
|
96
|
+
- Network requests (fetch interceptor, headers redacted)
|
|
97
|
+
- Navigation events (React Navigation integration, optional)
|
|
98
|
+
- Offline queue via `@react-native-async-storage/async-storage` — reports survive force-close
|
|
84
99
|
|
|
85
|
-
## Peer
|
|
100
|
+
## Peer dependencies
|
|
86
101
|
|
|
87
102
|
- `react` >= 18
|
|
88
103
|
- `react-native` >= 0.72
|
|
89
|
-
- `@react-navigation/native` >= 6 (optional)
|
|
90
|
-
- `@react-native-async-storage/async-storage` >= 1.19 (optional)
|
|
104
|
+
- `@react-navigation/native` >= 6 (optional — navigation capture)
|
|
105
|
+
- `@react-native-async-storage/async-storage` >= 1.19 (optional — offline queue)
|
|
106
|
+
- `expo-sensors` (optional — shake trigger only)
|
|
107
|
+
|
|
108
|
+
## Changelog highlights
|
|
109
|
+
|
|
110
|
+
- **v0.11.0** — Hermes compatibility fix: replaced `new Function()` dynamic imports with lazy `require()` for `@react-native-community/netinfo` and `expo-sensors`. Enables `trigger: 'button'` safely on all RN 0.84+ Hermes/AOT builds. Adds `MushiTrigger` headless component.
|
|
111
|
+
- **v0.8.x** — Shake-to-report listener, offline queue, navigation capture.
|
|
112
|
+
|
|
113
|
+
See the full [CHANGELOG](https://github.com/kensaurus/mushi-mushi/blob/master/packages/react-native/CHANGELOG.md).
|
|
91
114
|
|
|
92
115
|
## License
|
|
93
116
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native SDK for Mushi Mushi — shake-to-report, bottom sheet widget, full context capture",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mushi-mushi/core": "^1.
|
|
32
|
+
"@mushi-mushi/core": "^1.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "^19.2.14",
|