Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AXON-41] chore: fix stack limit and webview name strings #64

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions src/analyticsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,40 @@ export enum AnalyticsChannels {
AtlascodeUiErrors = 'atlascode.ui.errors',
}

/**
* Descriptions of the different pages that the extension can render as webviews.
* These appear in error reports, so it's best if they are verbose and descriptive.
*
* Values typically follow the pattern of `<type>:<version>:[?product]:<view>`
*
* Versions so far:
* - v1: (legacy) Webviews based on AbstractReactWebview
* - v2: (legacy) Webviews based on the WebviewController/WebviewControllerFactory architecture
*/
export enum AnalyticsView {
OnboardingPage = 'onboarding',
SettingsPage = 'settings',
WelcomePage = 'welcome',
// v1

CreateJiraIssuePage = 'page:v1:jira:createIssue',
JiraIssuePage = 'page:v1:jira:issue',
OldStartWorkPage = 'page:v1:bitbucket:startWork',

// v2

OnboardingPage = 'page:v2:onboarding',
SettingsPage = 'page:v2:settings',
WelcomePage = 'page:v2:welcome',

BitbucketIssuePage = 'bitbucketIssue',
PullRequestPage = 'pullRequest',
BitbucketIssuePage = 'page:v2:bitbucket:issue',
CreateBitbucketIssuePage = 'page:v2:bitbucket:createIssue',

CreateBitbucketIssuePage = 'createBitbucketIssue',
CreatePullRequestPage = 'createPullRequest',
PullRequestPage = 'page:v2:bitbucket:pullRequest',
CreatePullRequestPage = 'page:v2:bitbucket:createPullRequest',

CreateJiraIssuePage = 'createJiraIssue',
JiraIssuePage = 'jiraIssue',
PipelineSummaryPage = 'page:v2:bitbucket:pipeline',

PipelineSummaryPage = 'pipelineSummary',
StartWorkPage = 'page:v2:jira:startWork',

StartWorkPage = 'startWork',
OldStartWorkPage = 'oldStartWork',
// Reserved for future use

Other = 'other',
}
Expand Down
5 changes: 4 additions & 1 deletion src/react/atlascode/common/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { AnalyticsErrorBoundary, AnalyticsListener, UIAnalyticsEvent } from '@at
import { CommonActionType } from 'src/lib/ipc/fromUI/common';
import { AnalyticsChannels, UIAnalyticsContext } from 'src/analyticsTypes';

const STACK_LIMIT = 150;
// Maximum limit for the simplified stack trace
// We're using a high value deliberately for now, but it's arbitrary and can be changed in the future
const STACK_LIMIT = 1500;

const COMPONENT_GLOBAL = 'global';

export type AtlascodeErrorBoundaryProps = {
Expand Down
Loading