From 8d8e6d979a5aeff370f7700ab384bef4f799116e Mon Sep 17 00:00:00 2001 From: Oneric Date: Wed, 14 Jan 2026 00:00:00 +0000 Subject: [PATCH 1/9] polls: reduce frequency of update fetches Thirty seconds is much quicker than any other auto-refreshes in the interface. Emitting a request for every users and tab with the poll loaded this frequently can add up to a noteworthy total on the backend. This is significantly worsened by our backend currently synchronously fetching and updating the status of remote polls when queried about while initiating a remote fetch for every incoming request inbetween the last refetch passing the age threshold and the first current fetch suceeding and completing its db transaction. --- src/modules/polls.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/polls.js b/src/modules/polls.js index 1c4f98a4..f9e95f47 100644 --- a/src/modules/polls.js +++ b/src/modules/polls.js @@ -1,5 +1,7 @@ import { merge } from 'lodash' +const POLL_UPDATE_FREQUENCY = 150_000; + const polls = { state: { // Contains key = id, value = number of trackers for this poll @@ -44,13 +46,13 @@ const polls = { if (rootState.polls.trackedPolls[pollId]) { dispatch('updateTrackedPoll', pollId) } - }, 30 * 1000) + }, POLL_UPDATE_FREQUENCY) commit('mergeOrAddPoll', poll) }) }, trackPoll ({ rootState, commit, dispatch }, pollId) { if (!rootState.polls.trackedPolls[pollId]) { - setTimeout(() => dispatch('updateTrackedPoll', pollId), 30 * 1000) + setTimeout(() => dispatch('updateTrackedPoll', pollId), POLL_UPDATE_FREQUENCY) } commit('trackPoll', pollId) }, From 9bfd3936d673db15250a6ab38f8ae07878c2bf6f Mon Sep 17 00:00:00 2001 From: Oneric Date: Wed, 14 Jan 2026 00:00:00 +0000 Subject: [PATCH 2/9] polls: do not fetch updates for closed polls --- src/modules/polls.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/polls.js b/src/modules/polls.js index f9e95f47..29d602f8 100644 --- a/src/modules/polls.js +++ b/src/modules/polls.js @@ -14,6 +14,9 @@ const polls = { // Make expired-state change trigger re-renders properly poll.expired = Date.now() > Date.parse(poll.expires_at) if (existingPoll) { + if (poll.expired) { + state.trackedPolls[poll.id] = 0 + } state.pollsObject[poll.id] = merge(existingPoll, poll) } else { state.pollsObject[poll.id] = poll @@ -51,6 +54,9 @@ const polls = { }) }, trackPoll ({ rootState, commit, dispatch }, pollId) { + if (rootState.polls.pollsObject[pollId]?.expired) + return; + if (!rootState.polls.trackedPolls[pollId]) { setTimeout(() => dispatch('updateTrackedPoll', pollId), POLL_UPDATE_FREQUENCY) } From e3a72827ef410c17168d8b10612cacf7faa2883a Mon Sep 17 00:00:00 2001 From: Oneric Date: Sun, 25 Jan 2026 00:00:00 +0000 Subject: [PATCH 3/9] side_drawer: add entry for bookmarks It was not easily available in the narrow "mobile" interface until now since both the desktop_nav and top nav panel are hidden. Placing bookmarks after lists is consistent with the top nav panel (though the top nav panel also puts interactions before both). The recently removed "direct" timeline was similarly unavailable, but its replacement, dm conversations, was already added to the side drawer upon its introduction. Fixes: https://akkoma.dev/AkkomaGang/akkoma-fe/issues/474 --- src/components/side_drawer/side_drawer.js | 2 ++ src/components/side_drawer/side_drawer.vue | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js index 074123cf..d886e18a 100644 --- a/src/components/side_drawer/side_drawer.js +++ b/src/components/side_drawer/side_drawer.js @@ -9,6 +9,7 @@ import { faHome, faComments, faBolt, + faBookmark, faUserPlus, faBullhorn, faSearch, @@ -25,6 +26,7 @@ library.add( faHome, faComments, faBolt, + faBookmark, faUserPlus, faBullhorn, faSearch, diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index 8ba7e7af..3f072cf6 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -85,6 +85,18 @@ /> {{ $t("nav.lists") }} +
  • + + {{ $t("nav.bookmarks") }} + +
    • From 42595fcb2c68faf66143935f3fd6097e17f908dd Mon Sep 17 00:00:00 2001 From: Oneric Date: Mon, 26 Jan 2026 00:00:00 +0000 Subject: [PATCH 4/9] cosmetic: fix linter complaints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mostly just reordering, whitespace changes and removing superfluous "this". eslint really wants us to add :key to the UserAvatar list in DM conversation cards. With :key Vue will reorder elements instead of patching their contents on list changes, allowing input state of elements to be preserved. This doesn’t really seem relevant here since USerAvatars do not have a state, but also not harmful. One lint complaint about using double quotes at the outer level was purposefully ignored as it results in needing to quote double quotes within the string making it rather unreadable. --- src/components/dm_conv_card/dm_conv_card.vue | 17 ++-- .../dm_conv_timeline/dm_conv_timeline.vue | 8 +- src/components/emoji_grid/emoji_grid.vue | 2 +- src/components/emoji_input/emoji_input.vue | 2 +- src/components/emoji_picker/emoji_picker.vue | 2 +- src/components/media_modal/media_modal.vue | 2 +- .../post_status_form/post_status_form.vue | 7 +- src/components/status/status.vue | 16 ++-- src/components/timeline/timeline.vue | 2 +- src/components/user_card/user_card.vue | 88 ++++++++++--------- 10 files changed, 80 insertions(+), 66 deletions(-) diff --git a/src/components/dm_conv_card/dm_conv_card.vue b/src/components/dm_conv_card/dm_conv_card.vue index 91c55734..4d6e92ac 100644 --- a/src/components/dm_conv_card/dm_conv_card.vue +++ b/src/components/dm_conv_card/dm_conv_card.vue @@ -6,8 +6,9 @@
      -
       
      -

      {{ $t('dm_conv.default_name', {id: this.conversation.id}) }}

      +

      {{ $t('dm_conv.default_name', {id: conversation.id}) }}

      @@ -90,7 +95,7 @@ @accepted="doDeleteConversation" @cancelled="hideDeleteConfirmModal" > - {{ $t('dm_conv.delete_confirm', { identifier: this.conversation.id }) }} + {{ $t('dm_conv.delete_confirm', { identifier: conversation.id }) }}
      diff --git a/src/components/dm_conv_timeline/dm_conv_timeline.vue b/src/components/dm_conv_timeline/dm_conv_timeline.vue index ae5f3575..12406737 100644 --- a/src/components/dm_conv_timeline/dm_conv_timeline.vue +++ b/src/components/dm_conv_timeline/dm_conv_timeline.vue @@ -6,15 +6,15 @@ timeline-name="dmConv" > diff --git a/src/components/emoji_grid/emoji_grid.vue b/src/components/emoji_grid/emoji_grid.vue index 449590cc..b4728435 100644 --- a/src/components/emoji_grid/emoji_grid.vue +++ b/src/components/emoji_grid/emoji_grid.vue @@ -37,7 +37,7 @@ diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue index 8e2fcb53..5f0b2dac 100644 --- a/src/components/emoji_input/emoji_input.vue +++ b/src/components/emoji_input/emoji_input.vue @@ -51,7 +51,7 @@ {{ suggestion.replacement }} diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index c306d22b..3975632b 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -21,7 +21,7 @@ diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 1a56685b..673ee2ee 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -195,8 +195,8 @@ :class="{ 'visibility-tray-edit': isEdit }" >
      + class="format-selector-container" + >
      + >