mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-01 23:43:16 +01:00
PAP-1627: route sidebar memories link through active company prefix
The sidebar's Memories link was resolving to `/memories` instead of
`/:companyPrefix/memories` because `memories` was not in
`BOARD_ROUTE_ROOTS`. Without it, `applyCompanyPrefix` treated the path
as if `memories` were already a company prefix and skipped rewriting.
- Add `memories` to `BOARD_ROUTE_ROOTS` so `applyCompanyPrefix("/memories", "PAP")` returns `/PAP/memories`.
- Add a regression test covering `/memories` through `isBoardPathWithoutPrefix`, `extractCompanyPrefixFromPath`, and `applyCompanyPrefix`.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
16b2b84d84
commit
f7d651388f
2 files changed
+7
No files matched your search
@@ -20,4 +20,10 @@ describe("company routes", () => {
|
||||
"/execution-workspaces/workspace-123",
|
||||
);
|
||||
});
|
||||
|
||||
it("treats memories as a company board route", () => {
|
||||
expect(isBoardPathWithoutPrefix("/memories")).toBe(true);
|
||||
expect(extractCompanyPrefixFromPath("/memories")).toBeNull();
|
||||
expect(applyCompanyPrefix("/memories", "PAP")).toBe("/PAP/memories");
|
||||
});
|
||||
});
|
||||
@@ -9,6 +9,7 @@ const BOARD_ROUTE_ROOTS = new Set([
|
||||
"workspaces",
|
||||
"execution-workspaces",
|
||||
"issues",
|
||||
"memories",
|
||||
"routines",
|
||||
"goals",
|
||||
"approvals",
|
||||
|
||||
Reference in new issue
Block a user