Skip to content

Commit f607f47

Browse files
committed
fix: remove redundant v prefix from app_version display
1 parent dbbdd4a commit f607f47

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

client/src/components/Sessions/SessionDetails/SessionInfoTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export function SessionInfoTab({
186186
{t("App Version:")}
187187
</span>
188188
<span className="text-neutral-500 dark:text-neutral-400">
189-
v{sessionDetails.app_version}
189+
{sessionDetails.app_version}
190190
</span>
191191
</div>
192192
)}

server/src/services/tracker/pageviewQueue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class PageviewQueue {
123123
is_tor: dataForIp?.isTor ?? null,
124124
is_satellite: dataForIp?.isSatellite ?? null,
125125
app_version: pv.app_version || "",
126-
device_model: pv.device_model || "",
126+
device_model: pv.device_model || sdkUA?.deviceModel || "",
127127
};
128128
});
129129

server/src/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,30 +131,33 @@ export function parseSDKUserAgent(userAgent: string): {
131131
browserVersion: string;
132132
os: string;
133133
osVersion: string;
134+
deviceModel: string;
134135
} | null {
135136
// 3-part format (with packageName)
136137
const match3 = userAgent.match(
137-
/^(.+?)\/(\S+)\s+\([^;]+;\s*(\w+)\s+([^;]+);\s*[^)]+\)\s+\S+\/\S+$/
138+
/^(.+?)\/(\S+)\s+\([^;]+;\s*(\w+)\s+([^;]+);\s*([^)]+)\)\s+\S+\/\S+$/
138139
);
139140
if (match3) {
140141
return {
141142
browser: match3[1],
142143
browserVersion: match3[2],
143144
os: match3[3],
144145
osVersion: match3[4].trim(),
146+
deviceModel: match3[5].trim(),
145147
};
146148
}
147149

148150
// 2-part format (without packageName)
149151
const match2 = userAgent.match(
150-
/^(.+?)\/(\S+)\s+\((\w+)\s+([^;]+);\s*[^)]+\)\s+\S+\/\S+$/
152+
/^(.+?)\/(\S+)\s+\((\w+)\s+([^;]+);\s*([^)]+)\)\s+\S+\/\S+$/
151153
);
152154
if (match2) {
153155
return {
154156
browser: match2[1],
155157
browserVersion: match2[2],
156158
os: match2[3],
157159
osVersion: match2[4].trim(),
160+
deviceModel: match2[5].trim(),
158161
};
159162
}
160163

0 commit comments

Comments
 (0)