Skip to content

Chrome extension#628

Draft
ryanbas21 wants to merge 62 commits intomainfrom
chrome-extension
Draft

Chrome extension#628
ryanbas21 wants to merge 62 commits intomainfrom
chrome-extension

Conversation

@ryanbas21
Copy link
Copy Markdown
Collaborator

JIRA Ticket

n/a

Description

As demo'd chrome extension devtool.

ryanbas21 added 30 commits May 6, 2026 18:38
Adds the devtools-extension package skeleton with Chrome MV3 manifest,
Nx project config (esbuild + Elm build pipeline), TypeScript configs,
Vite test config, and ESLint config. Installs [email protected] as a dev dep.
Build commands guard against missing src/ so the target passes before
source files are added in subsequent tasks.
…roadcast

Scaffolds the Elm 0.19.1 panel with Types, Model, Update, View, Graph,
Timeline, and Inspector modules. Wires the service worker to broadcast
NETWORK_EVENT and SDK_EVENT results to the panel via chrome.runtime.sendMessage.
…g, structured LLM export

- Replace Decode.map8 with andMap pipeline; decode url/method/status/nodeStatus from data.*
- statusColor accepts Maybe Int; show "-" for non-HTTP events instead of red "0"
- Structure LLM export as a typed flow object instead of dumping raw state
- Remove as-casts from message-handler; TypeScript infers the return union naturally
… script/SW issues

- Add @forgerock/devtools-bridge to davinci-app for end-to-end testing
- Split content script into MAIN-world injector + isolated-world relay (postMessage
  bridge) to cross the Chrome isolated world boundary without CSP violations
- Move Effect/schema validation out of content script into service worker to avoid
  22k-line bundle crash in content script context
- Add export {} footer to service worker esbuild for ES module recognition
- Filter network events to auth-related requests only before appending to store
- Fix Elm dead-code elimination: wrap update with updateWithPorts so exportFlow/
  clearFlow ports survive --optimize compilation
- Add SDK node-change row rendering with status-colored left border in Timeline
- Guard broadcastToPanel against null results (filtered/invalid events)
- Add README.md documenting extension architecture, build, and bridge wiring
- Update content-script test to match simplified postMessage relay behavior
ryanbas21 added 25 commits May 7, 2026 14:16
…terval calc

- Guard PlaybackTick so stale in-flight ticks don't restart playback after mode switch
- Add parentheses around flowHealth == Error to fix operator precedence with &&
- Remove round/toFloat round-trip in interval calc; use Float literals directly
- Disable Play button when no SDK nodes are available
…de detail card

The detail card previously looked for response/collectors on attributed network
events, which never had that data. The real response payload lives in the DaVinci
client's RTK Query cache keyed by node.cache?.key (= requestId).

- davinci-client: add cache.getCache(requestId) that resolves RTK selectors with
  store state to return actual data (not just the selector function)
- devtools-types: add responseBody field to SdkDataSchema so sdk:node-change
  events can carry the DaVinci raw response
- devtools-bridge: extend Subscribable with optional cache.getCache, pass cached
  response as responseBody when building node SDK events
- FlowView.elm: split detail card into node data section (response + collectors
  from the node event) and network section (HTTP requests attributed to the node);
  remove collectors lookup from network events where it never existed
- panel.html: add .fv-node-label CSS class for the node response header
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: e825261

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a427ca5c-3d83-4e1b-83ba-9eacb7706c92

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chrome-extension

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented May 8, 2026

View your CI Pipeline Execution ↗ for commit e825261

Command Status Duration Result
nx affected -t build lint test typecheck e2e-ci ❌ Failed 1m 59s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-08 21:01:13 UTC

@@ -0,0 +1,119 @@
import { describe, it, expect } from 'vitest';
import { Effect } from 'effect';
import { EventStoreService, EventStoreLive, makeEmptyFlowState } from './event-store.service.js';
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud is proposing a fix for your failed CI:

We added causedBy: null to the baseEvent fixture and the standalone sdk event input in auth-event.schema.test.ts to fix 3 failing decode tests. The AuthEventSchema was updated in this PR to include causedBy as a required NullOr(String) field, but the test fixtures were not updated alongside it, causing ParseError: ["causedBy"] is missing for every decode assertion.

Tip

We verified this fix by re-running @forgerock/devtools-types:test.

diff --git a/packages/devtools-types/src/lib/auth-event.schema.test.ts b/packages/devtools-types/src/lib/auth-event.schema.test.ts
index ef9d96e..2bf6fc8 100644
--- a/packages/devtools-types/src/lib/auth-event.schema.test.ts
+++ b/packages/devtools-types/src/lib/auth-event.schema.test.ts
@@ -7,6 +7,7 @@ const baseEvent = {
   timestamp: 1700000000000,
   source: 'network' as const,
   flowId: 'flow-abc',
+  causedBy: null,
   flags: {
     isCors: false,
     isError: false,
@@ -106,6 +107,7 @@ describe('AuthEventSchema', () => {
       type: 'sdk:node-change',
       source: 'sdk',
       flowId: 'flow-xyz',
+      causedBy: null,
       flags: { isCors: false, isError: false, isAuthRelated: true },
       data: {
         _tag: 'sdk',

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally aKaE-ZJ00

Apply fix locally with your editor ↗   View interactive diff ↗



🎓 Learn more about Self-Healing CI on nx.dev

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant