[PR #602] [CLOSED] fix(web): fix stale documents list by forcing refresh after uploading #1072

Closed
opened 2026-02-26 19:31:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/602
Author: @itsmingjie
Created: 10/27/2023
Status: Closed

Base: feat/refreshHead: itsmingjie/patch-upload-601


📝 Commits (1)

  • 87f1838 fix(web): fix stale documents list by forcing refresh after uploading

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/upload-document.tsx (+1 -0)

📄 Description

This is an attempt at fixing #601 by forcing a router refresh before sending the user away.

Note: I also attempted to use revalidatePath but it seems like Next.js isn't liking

Error: Invariant: static generation store missing in revalidateTag _N_T_/(dashboard)/documents/page

So via https://github.com/vercel/next.js/issues/50714 it seems like a better way to do this is waiting for unstable_cache to become stable and setting cache keys for this.

I'm not a fan of this hack as well. But if there's any better ways to handle this now, or if it's better to just wait for the cache API, please correct me!

**
fixes #601


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/602 **Author:** [@itsmingjie](https://github.com/itsmingjie) **Created:** 10/27/2023 **Status:** ❌ Closed **Base:** `feat/refresh` ← **Head:** `itsmingjie/patch-upload-601` --- ### 📝 Commits (1) - [`87f1838`](https://github.com/documenso/documenso/commit/87f183822ed4f31b74034c66bd4b12486a317ad1) fix(web): fix stale documents list by forcing refresh after uploading ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/upload-document.tsx` (+1 -0) </details> ### 📄 Description This is an attempt at fixing #601 by forcing a router refresh before sending the user away. Note: I also attempted to use `revalidatePath` but it seems like Next.js isn't liking ``` Error: Invariant: static generation store missing in revalidateTag _N_T_/(dashboard)/documents/page ``` So via https://github.com/vercel/next.js/issues/50714 it seems like a better way to do this is waiting for [`unstable_cache`](https://nextjs.org/docs/app/api-reference/functions/unstable_cache) to become stable and setting cache keys for this. I'm not a fan of this hack as well. But if there's any better ways to handle this now, or if it's better to just wait for the cache API, please correct me! ** fixes #601 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:31:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1072
No description provided.