Skip to content

feat(contexts): Differentiate client OS title #88536

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

Merged
merged 3 commits into from
Apr 4, 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
5 changes: 5 additions & 0 deletions static/app/components/events/contexts/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ export function getContextTitle({
return getPlatformContextTitle({platform: alias});
}

if (alias === 'client_os') {
// To differentiate from `os` and avoid confusion with two items called "Operating System"
return t('Client Operating System');
}

switch (contextType) {
case 'app':
return t('App');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ describe('HighlightsIconSummary', function () {
expect(screen.getByText('Mac OS X')).toBeInTheDocument();
expect(screen.getByText('10.15')).toBeInTheDocument();
await userEvent.hover(screen.getByText('10.15'));
expect(await screen.findByText('Operating System Version')).toBeInTheDocument();
expect(
await screen.findByText('Client Operating System Version')
).toBeInTheDocument();
expect(screen.getByText('CPython')).toBeInTheDocument();
expect(screen.getByText('3.8.13')).toBeInTheDocument();
await userEvent.hover(screen.getByText('3.8.13'));
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/events/highlights/util.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('getHighlightContextData', function () {
it.each([
['alias', {client_os: ['version']}],
['type', {os: ['version']}],
['title', {'Operating System': ['version']}],
['title', {'Client Operating System': ['version']}],
])('matches highlights on context %s', (_type, highlightContext) => {
const {organization, project} = initializeOrg();
const event = EventFixture({
Expand Down
Loading