Skip to content

fix(sessions): label Edge browsers correctly - #196

Open
11suixing11 wants to merge 2 commits into
fells-code:mainfrom
11suixing11:fix/edge-session-browser-label
Open

fix(sessions): label Edge browsers correctly#196
11suixing11 wants to merge 2 commits into
fells-code:mainfrom
11suixing11:fix/edge-session-browser-label

Conversation

@11suixing11

@11suixing11 11suixing11 commented Jul 26, 2026

Copy link
Copy Markdown

Summary

  • Check Edge user-agent tokens before the generic Chrome and Safari matches.
  • Share one browser-label parser between the global Sessions page and UserDetail.
  • Add regression coverage for Edge session rows and Edge credential rows.

Why

Closes #163.

Edge user-agent strings include Chrome and Safari tokens. The previous matching order labeled Chromium Edge sessions as Chrome.

Review Follow-up

@Bccorb asked whether the credential detail surface also picks up Edge correctly. Addressed in b419bb1 by adding a UserDetail regression with:

  • an Edge session user agent
  • an Edge credential row
  • shared parsing through src/lib/userAgent.ts

The branch was later rebased onto the latest main after the API types migration; the current head is 0900a5d.

Verification

  • npm test -- --run src/pages/Sessions.test.tsx src/pages/UserDetail.test.tsx
  • npm test -- --run
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm run build
  • git diff --check

Notes

  • The Vite build still prints the existing /config.js bundling warning and chunk-size warning.

@Bccorb

Bccorb commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Taking a look at this! Can you add a credential with edge to see if picks up?

@11suixing11

Copy link
Copy Markdown
Author

Added this in b419bb1.

What changed:

  • shared the browser label parser between the global Sessions page and UserDetail
  • kept Edg ahead of the generic Chrome match everywhere it is used
  • added UserDetail coverage with an Edge session user agent and an Edge credential row, so the detail view proves both surfaces render Edge correctly

Verification:

  • npm test -- --run src/pages/Sessions.test.tsx src/pages/UserDetail.test.tsx
  • npm run typecheck
  • npm run lint -- --quiet src/pages/Sessions.tsx src/pages/UserDetail.tsx src/pages/UserDetail.test.tsx src/lib/userAgent.ts
  • npm exec -- prettier --check src/pages/Sessions.tsx src/pages/UserDetail.tsx src/pages/UserDetail.test.tsx src/lib/userAgent.ts
  • git diff --check

@11suixing11
11suixing11 force-pushed the fix/edge-session-browser-label branch from b419bb1 to 0900a5d Compare July 29, 2026 07:14
@11suixing11

Copy link
Copy Markdown
Author

Rebased this branch onto the latest main after the API types migration, resolving the dirty merge state while keeping the change scoped to the shared browser-label parser.

Current head: 0900a5d

Verification after the rebase:

  • npm test -- --run src/pages/Sessions.test.tsx src/pages/UserDetail.test.tsx
  • npm test -- --run
  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm run build
  • git diff --check

The build still reports the existing Vite warnings for /config.js and the large application chunk.

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.

Microsoft Edge sessions are reported as Chrome

2 participants