diff --git a/src/components/InviteYourself.vue b/src/components/InviteYourself.vue
index 3f2c2425..a86db232 100644
--- a/src/components/InviteYourself.vue
+++ b/src/components/InviteYourself.vue
@@ -2,7 +2,7 @@
-
diff --git a/src/plugin/piniaActionTrail.js b/src/plugin/piniaActionTrail.js
index a605dc1e..5434569d 100644
--- a/src/plugin/piniaActionTrail.js
+++ b/src/plugin/piniaActionTrail.js
@@ -1,6 +1,7 @@
import dayjs from 'dayjs';
const STORAGE_KEY = 'vrcx:sentry:piniaActions';
+const DEFAULT_MAX_ENTRIES = 200;
function getStorage() {
try {
@@ -41,15 +42,17 @@ export function clearPiniaActionTrail() {
storage.removeItem(STORAGE_KEY);
}
-export function appendPiniaActionTrail(entry) {
+export function appendPiniaActionTrail(entry, options) {
const storage = getStorage();
if (!storage) return;
+ const maxEntries = options?.maxEntries ?? DEFAULT_MAX_ENTRIES;
+
const existing = getPiniaActionTrail();
existing.push(entry);
- if (existing.length > 200) {
- existing.splice(0, existing.length - 200);
+ if (existing.length > maxEntries) {
+ existing.splice(0, existing.length - maxEntries);
}
try {
@@ -59,13 +62,17 @@ export function appendPiniaActionTrail(entry) {
}
}
-export function createPiniaActionTrailPlugin() {
+export function createPiniaActionTrailPlugin(options) {
+ const maxEntries = options?.maxEntries ?? DEFAULT_MAX_ENTRIES;
return ({ store }) => {
store.$onAction(({ name }) => {
- appendPiniaActionTrail({
- t: dayjs().format('HH:mm:ss'),
- a: name
- });
+ appendPiniaActionTrail(
+ {
+ t: dayjs().format('HH:mm:ss'),
+ a: name
+ },
+ { maxEntries }
+ );
});
};
}
diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js
index 1e471db8..d0e3e1a0 100644
--- a/src/stores/vrcx.js
+++ b/src/stores/vrcx.js
@@ -5,7 +5,6 @@ import { toast } from 'vue-sonner';
import { useI18n } from 'vue-i18n';
import Noty from 'noty';
-import dayjs from 'dayjs';
import {
clearPiniaActionTrail,
@@ -532,16 +531,12 @@ export const useVrcxStore = defineStore('Vrcx', () => {
if (advancedSettingsStore.sentryErrorReporting) {
try {
import('@sentry/vue').then((Sentry) => {
- const cutoff = dayjs().subtract(30, 'minute');
const trail = getPiniaActionTrail().filter((entry) => {
- if (!entry || typeof entry.ts !== 'number') {
- return false;
- }
- const ts = dayjs(entry.ts);
- if (!ts.isValid()) {
- return false;
- }
- return ts.isAfter(cutoff) || ts.isSame(cutoff);
+ if (!entry) return false;
+ return (
+ typeof entry.t === 'string' &&
+ typeof entry.a === 'string'
+ );
});
const trailText = JSON.stringify(trail);
Sentry.withScope((scope) => {
diff --git a/src/views/Sidebar/components/FriendsSidebar.vue b/src/views/Sidebar/components/FriendsSidebar.vue
index f9d987c5..481d60d6 100644
--- a/src/views/Sidebar/components/FriendsSidebar.vue
+++ b/src/views/Sidebar/components/FriendsSidebar.vue
@@ -89,7 +89,7 @@