Skip to content

fix(frontend): include destroyed when counting actors#3965

Closed
jog1t wants to merge 1 commit into01-17-fix_website_invalid_importfrom
01-17-fix_frontend_include_destroyed_when_counting_actors
Closed

fix(frontend): include destroyed when counting actors#3965
jog1t wants to merge 1 commit into01-17-fix_website_invalid_importfrom
01-17-fix_frontend_include_destroyed_when_counting_actors

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Jan 17, 2026

No description provided.

@jog1t jog1t marked this pull request as ready for review January 17, 2026 03:53
Copy link
Copy Markdown
Contributor Author

jog1t commented Jan 17, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Jan 17, 2026

Merge activity

  • Jan 17, 3:53 AM UTC: jog1t added this pull request to the Graphite merge queue.
  • Jan 17, 3:54 AM UTC: CI is running for this pull request on a draft pull request (#3966) due to your merge queue CI optimization settings.
  • Jan 17, 3:54 AM UTC: Merged by the Graphite merge queue via draft PR: #3966.

@claude
Copy link
Copy Markdown

claude bot commented Jan 17, 2026

PR Review: fix(frontend): include destroyed when counting actors

Summary

This PR makes two frontend improvements:

  1. Includes destroyed actors when counting actors in the namespace context
  2. Adds project and namespace metadata to the PostHog onboarding skip event

Code Quality ✅

Positive observations:

  • Both changes are focused and minimal
  • The includeDestroyed: true fix addresses a likely bug where destroyed actors weren't being counted
  • Adding metadata to the PostHog event improves analytics tracking capabilities

Analysis

Change 1: Include destroyed actors in count

client.actorsList({
    namespace,
    name,
    limit: 1,
+   includeDestroyed: true,
})

Purpose: The code at engine-data-provider.tsx:665-678 appears to be counting total actors across all actor names. By adding includeDestroyed: true, destroyed actors are now included in this count.

Question: Is including destroyed actors the desired behavior for this count? Consider:

  • If this count is used for display purposes, should users see destroyed actors?
  • If this is for billing/quota purposes, including destroyed actors makes sense
  • The change seems intentional based on the PR title, but confirming the use case would be helpful

Change 2: Enhanced PostHog analytics

-posthog.capture("onboarding_skipped");
+posthog.capture("onboarding_skipped", {
+    project: params.project,
+    namespace: params.namespace,
+});

Good: Adding context to analytics events is a best practice. This will help track which projects/namespaces are skipping onboarding.

Potential Concerns

  1. Consistency: Are there other places in the codebase where actorsList is called without includeDestroyed? You may want to audit other usages to ensure consistent behavior across the frontend.

  2. Performance: The includeDestroyed: true parameter might affect query performance depending on how it's implemented in the backend. If the actors table is large with many destroyed actors, this could be a consideration (though with limit: 1, the impact should be minimal).

Security ✅

No security concerns identified. The changes don't introduce any new attack vectors.

Testing

Recommendation: Consider testing:

  • Verify the actor count now reflects destroyed actors correctly
  • Confirm the PostHog event includes the expected metadata in analytics dashboards

Verdict

LGTM ✅ - The changes are clean and focused. The only suggestion is to verify that including destroyed actors is the intended behavior for all consumers of this count.

@graphite-app graphite-app bot closed this Jan 17, 2026
@graphite-app graphite-app bot deleted the 01-17-fix_frontend_include_destroyed_when_counting_actors branch January 17, 2026 03:54
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Jan 17, 2026

Graphite Automations

"Test" took an action on this PR • (01/17/26)

1 assignee was added to this PR based on Kacper Wojciechowski's automation.

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.

1 participant