Skip to content

feat: add navigation skill with MetaMask Mobile overlay - #148

Open
NicolasMassart wants to merge 1 commit into
feat/MCWP-827_feature-flagsfrom
feat/MCWP-829_navigation
Open

feat: add navigation skill with MetaMask Mobile overlay#148
NicolasMassart wants to merge 1 commit into
feat/MCWP-827_feature-flagsfrom
feat/MCWP-829_navigation

Conversation

@NicolasMassart

@NicolasMassart NicolasMassart commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Adds navigation in the platform domain: shared skill.md, MetaMask Mobile overlay, and CHANGELOG. Marked base: true so it installs with the default base set.

Why a shared skill plus a repo overlay. skill.md is the workflow every consumer shares. repos/metamask-mobile.md is the Mobile wiring. A Mobile-only skill would be fewer files today; the next consumer would then copy or fork it. Overlay merge is the existing pattern in this repo.

Why base: true. Engineers who never select the platform domain still get this skill on postinstall, same as the other base skills. Relying on --include or SKILLS_DOMAINS=platform would miss most clones. Cost: always-on description tokens. --exclude / SKILLS_EXCLUDE still skips it.

Fixes MCWP-829.

Type of Change

  • New skill
  • Skill improvement/update
  • Bug fix
  • Documentation update
  • Other (please describe):

Skill Details (if adding a new skill)

Provider Name: MetaMask
Skill Name: navigation
Brief Description: App navigation with named routes, with a MetaMask Mobile overlay for Routes and NavigationService.

Checklist

  • I have read the CONTRIBUTING.md guidelines
  • My skill follows the SKILL_TEMPLATE.md format
  • I have tested this skill with an AI agent
  • My skill does not contain any secrets, private keys, or sensitive data
  • I have added appropriate documentation
  • My changes don't break existing skills

Testing

  • Confirm yarn audit:skills accepts the new skill frontmatter
  • Install the skill and confirm it is selected when adding or changing screens in MetaMask Mobile
  • Confirm base: true still installs the skill when its domain is filtered out
  • Confirm --exclude / SKILLS_EXCLUDE still skips it when explicitly excluded

Proof of testing the skill

See the generated skill test report: skill-test-navigation.local.md

Additional Context

MCWP-829

Made with Cursor

@NicolasMassart
NicolasMassart force-pushed the feat/MCWP-829_navigation branch from 88a8b65 to 452c175 Compare September 4, 2026 09:39
@NicolasMassart
NicolasMassart changed the base branch from feat/MCWP-826_Analytics-skill to feat/MCWP-827_feature-flags September 4, 2026 09:39
@NicolasMassart NicolasMassart self-assigned this Sep 4, 2026
| Non-UI navigator | `app/core/NavigationService/` — `NavigationService.navigation` (`navigate` and `reset` are deferred with `requestAnimationFrame`) |
| Route names | `app/constants/navigation/Routes.ts` |
| Typed params | `app/core/NavigationService/types.ts` and navigator `ParamList` types under `app/components/Nav/` |
| Screens | `useNavigation` from `@react-navigation/native` (React Navigation v5) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v7, not v5 — package.json pins @react-navigation/native 7.3.14, native-stack 7.18.6, bottom-tabs 7.18.14, and @react-navigation/stack isn't installed. An agent trusting "v5" will reach for APIs and a package that don't exist.


- Route names from `Routes`, not string literals.
- Component screens use `useNavigation`. Non-UI callers (deeplinks, Engine, sagas, `Authentication`) use `NavigationService.navigation`.
- Typed params. Tests mock `NavigationService` / `@react-navigation/native` as existing tests in that folder already do.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typed params only holds for useNavigation(), which is checked against RootStackParamList via the ReactNavigation.RootParamList merge in app/core/NavigationService/types.ts. NavigationService.navigation is NavigationContainerRef<ParamListBase> — nothing through it is type-checked. Please carve that out, otherwise this reads as type safety on exactly the callers (deeplinks, Authentication) where a wrong param shape fails silently.

## Requirements

- Route names from `Routes`, not string literals.
- Component screens use `useNavigation`. Non-UI callers (deeplinks, Engine, sagas, `Authentication`) use `NavigationService.navigation`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: components legitimately use NavigationService when there's no navigator context (PerpsTutorialCarousel), and older class screens use props.navigation. Stated this absolutely it invites refactors of code that's fine — a preference reads better than a rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants