Repository navigation
Fix: 4 issues (#931, #932, #933, #934) - #962
Merged
Kingsman-99 merged 1 commit intoOct 20, 2026
Merged
Conversation
Co-authored-by: Simple Agent <agent@simple.dev>
|
@joel-metal is attempting to deploy a commit to the kingsman-99's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@joel-metal Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #931
Closes #932
Closes #933
Closes #934
Issues
#931 Create user guide and onboarding documentation
#932 Implement breadcrumb navigation and contextual help
#933 Add error tracking and crash reporting (Sentry, LogRocket, etc)
#934 Implement feature flags for gradual rollout
Summary
Sentry and feature flag SDKs must remain optional: guard all imports behind env checks so CI without secrets still passes. Ensure all new components have accessible names and keyboard support to satisfy the a11y gate. Run lint, typecheck, unit tests, and Playwright a11y tests before opening the PR.
Changes
, mark the last item with aria-current="page", and avoid duplicate Home entries. Export a helper to build trails from route segments so pages can override labels. (src/components/Breadcrumb.tsx)- Create a HelpTooltip component (src/components/HelpTooltip.tsx) that renders a focusable help icon button with aria-describedby pointing at a tooltip element, supports keyboard focus/escape, and emits a help_opened analytics event with the help key. Also create src/lib/helpContent.ts exporting a registry of help entries keyed by id with title/body text used by the tooltip and contextual help. (src/components/HelpTooltip.tsx)
- Mount the Breadcrumb component in the Navbar (below the header) so every non-home route shows a contextual trail, and add a HelpTooltip next to the shortcuts button linking to the user guide. Ensure the breadcrumb is hidden on the home route and that the help icon has an accessible name. (src/components/Navbar.tsx)
- Create src/lib/analytics.ts with a small typed event helper (trackEvent(name, props)) that no-ops when analytics is unavailable, plus specific helpers trackHelpOpened(helpKey) and trackFeatureFlagExposure(flagKey, variant). This backs both the help analytics requirement and feature flag exposure analytics. (src/lib/analytics.ts)
- Harden Sentry initialization in instrumentation.ts: read DSN/org/project from env, set environment and release tags, configure beforeSend to scrub PII (emails, wallet addresses, cookies), and enable error grouping defaults. Keep the existing no-DSN no-op behavior. (instrumentation.ts)
- Update instrumentation-client.ts to add Sentry browser tracing, replay-on-error sampling, beforeSend PII scrubbing, and a setUser helper that only sends a hashed wallet identifier. Ensure onRouterTransitionStart remains exported. (instrumentation-client.ts)
- Configure Sentry sourcemap upload in next.config.js: enable hideSourceMaps, widenClientFileUpload, set org/project/authToken from env, and disable plugins when NEXT_PUBLIC_SENTRY_DSN is absent. Add tunnelRoute if needed for ad-blocker resilience. (next.config.js)
- Update ErrorBoundary.tsx to attach custom context before captureException: set Sentry tags for error kind (from classifyError), route pathname, and a hashed wallet address, and set a fingerprint based on error kind so grouping is stable. Keep the dynamic import fallback. (src/components/ErrorBoundary.tsx)
- Update src/app/error.tsx to report the error to Sentry with the digest as a tag and route context, in addition to the existing console.error, so route-level errors are captured. (src/app/error.tsx)
- Add a Sentry alert configuration note and env var documentation to .env.example (SENTRY_ORG, SENTRY_PROJECT, SENTRY_AUTH_TOKEN, NEXT_PUBLIC_SENTRY_DSN) and document the alert rules for critical errors in docs/ACCESSIBILITY.md or a new docs/ERROR_TRACKING.md. (.env.example)
- Extend src/lib/config.ts with feature flag configuration: a FEATURE_FLAGS object read from NEXT_PUBLIC_FEATURE_FLAGS (JSON) with defaults, plus a helper isFlagEnabled(key, context) supporting boolean and percentage-based rollout using a stable hash of the user id. (src/lib/config.ts)
- Create src/contexts/FeatureFlagContext.tsx providing a FeatureFlagProvider that loads flags from config/remote source, exposes useFeatureFlag(key) and useFeatureFlags(), and emits trackFeatureFlagExposure on first evaluation per session. Wrap the app with the provider in layout.tsx. (src/contexts/FeatureFlagContext.tsx)
- Create an admin feature flag UI at src/app/admin/feature-flags/page.tsx that lists flags with toggles and rollout percentages, calls an API route to persist overrides, and is gated behind an admin flag. Include accessible labels and confirmation feedback. (src/app/admin/feature-flags/page.tsx)
- Add a feature flag API route at src/app/api/feature-flags/route.ts (GET returns evaluated flags for the current user, POST updates overrides for admins) using apiClient for CSRF-protected mutations. (src/app/api/feature-flags/route.ts)
- Document feature flag lifecycle, naming, rollout percentages, A/B testing, and cleanup in docs/FEATURE_FLAGS.md, and link it from the user guide and CONTRIBUTING.md. (docs/FEATURE_FLAGS.md)