From a6942e4179c5b724e6045265271f672cc664ef3a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 04:21:31 +0000 Subject: [PATCH 1/8] Initial plan From 7304ebf2d1f3ebd01d8eb2c75a2ffbfa7a944140 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 22 Mar 2026 04:27:46 +0000 Subject: [PATCH 2/8] Add tool owner update trigger: API endpoint and dashboard UI button Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com> Agent-Logs-Url: https://github.com/PowerPlatformToolBox/pptb-web/sessions/1c485f85-1c92-4aa8-b3b6-dc26b6b4f1f8 --- app/(authenticated)/dashboard/page.tsx | 38 +++++ app/api/dashboard/route.ts | 1 + app/api/tools/[id]/trigger-update/route.ts | 160 +++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 app/api/tools/[id]/trigger-update/route.ts diff --git a/app/(authenticated)/dashboard/page.tsx b/app/(authenticated)/dashboard/page.tsx index d443349..72f3fd4 100644 --- a/app/(authenticated)/dashboard/page.tsx +++ b/app/(authenticated)/dashboard/page.tsx @@ -26,6 +26,7 @@ interface Tool { icon: string; user_id?: string; status?: string; + packagename?: string; tool_categories?: Array<{ categories: { id: number; @@ -48,6 +49,7 @@ export default function DashboardPage() { const [viewMode, setViewMode] = useState<"all" | "my">("all"); const [isAdmin, setIsAdmin] = useState(false); const [authToken, setAuthToken] = useState(""); + const [triggeringUpdateForToolId, setTriggeringUpdateForToolId] = useState(null); useEffect(() => { // Get auth token from sessionStorage (set by layout) @@ -123,6 +125,34 @@ export default function DashboardPage() { } }; + const handleTriggerUpdate = async (toolId: string) => { + if (!user || !authToken) return; + + if (!confirm("Are you sure you want to trigger an update for this tool? This will run the update workflow.")) return; + + setTriggeringUpdateForToolId(toolId); + try { + const response = await fetch(`/api/tools/${toolId}/trigger-update`, { + method: "POST", + headers: { + Authorization: `Bearer ${authToken}`, + }, + }); + + if (!response.ok) { + const errorData = await response.json(); + throw new Error(errorData.error || "Failed to trigger update"); + } + + alert("Update workflow triggered successfully!"); + } catch (error) { + console.error("Error triggering tool update:", error); + alert(`Failed to trigger update: ${error instanceof Error ? error.message : "Please try again."}`); + } finally { + setTriggeringUpdateForToolId(null); + } + }; + // Filter tools based on view mode const filteredTools = viewMode === "my" ? tools.filter((tool) => tool.user_id === user?.id) : tools.filter((tool) => tool.status !== TOOL_STATUSES.DELETED && tool.status !== TOOL_STATUSES.DEPRECATED); @@ -397,6 +427,14 @@ export default function DashboardPage() { View | + + | + +
+ {validationModal.errors.length > 0 && ( +
+

Errors ({validationModal.errors.length})

+
    + {validationModal.errors.map((err, i) => ( +
  • + + + + {err} +
  • + ))} +
+
+ )} + {validationModal.warnings.length > 0 && ( +
+

Warnings ({validationModal.warnings.length})

+
    + {validationModal.warnings.map((warn, i) => ( +
  • + + + + {warn} +
  • + ))} +
+
+ )} +
+
+ +
+ + + )} ); } From d7645fd9726273518005d06647515bf61b4dfc5e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 04:02:16 +0000 Subject: [PATCH 4/8] Add Version column and More dropdown menu to My Tools view Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com> Agent-Logs-Url: https://github.com/PowerPlatformToolBox/pptb-web/sessions/f77f96fa-7ef4-4ceb-8bd8-2c5866ac6f44 --- app/(authenticated)/dashboard/page.tsx | 104 +++++++++++++++++++------ app/api/dashboard/route.ts | 1 + 2 files changed, 81 insertions(+), 24 deletions(-) diff --git a/app/(authenticated)/dashboard/page.tsx b/app/(authenticated)/dashboard/page.tsx index f698e2f..3caaf30 100644 --- a/app/(authenticated)/dashboard/page.tsx +++ b/app/(authenticated)/dashboard/page.tsx @@ -27,6 +27,7 @@ interface Tool { user_id?: string; status?: string; packagename?: string; + version?: string; tool_categories?: Array<{ categories: { id: number; @@ -50,6 +51,7 @@ export default function DashboardPage() { const [isAdmin, setIsAdmin] = useState(false); const [authToken, setAuthToken] = useState(""); const [triggeringUpdateForToolId, setTriggeringUpdateForToolId] = useState(null); + const [openMoreMenuForToolId, setOpenMoreMenuForToolId] = useState(null); const [validationModal, setValidationModal] = useState<{ packageName: string; errors: string[]; @@ -371,6 +373,7 @@ export default function DashboardPage() { Tool Category + {viewMode === "my" && Version} {viewMode === "my" && Status} Downloads Rating @@ -413,6 +416,15 @@ export default function DashboardPage() { )} + {viewMode === "my" && ( + + {tool.version ? ( + v{tool.version} + ) : ( + -- + )} + + )} {viewMode === "my" && ( {tool.status === TOOL_STATUSES.DEPRECATED ? ( @@ -435,36 +447,80 @@ export default function DashboardPage() { {analytics?.mau?.toLocaleString() || "--"} -
+
{viewMode === "my" ? ( <> View | - - | - - | - +
+ + {openMoreMenuForToolId === tool.id && ( + <> +
setOpenMoreMenuForToolId(null)} + onKeyDown={(e) => e.key === "Escape" && setOpenMoreMenuForToolId(null)} + /> +
+ + +
+ +
+ + )} +
) : ( <> diff --git a/app/api/dashboard/route.ts b/app/api/dashboard/route.ts index 22ff764..4107a83 100644 --- a/app/api/dashboard/route.ts +++ b/app/api/dashboard/route.ts @@ -59,6 +59,7 @@ export async function GET(request: NextRequest) { user_id, status, packagename, + version, tool_analytics (downloads, rating, mau), tool_categories ( categories (id, name) From fba4efbd4f641f005763b62ea19931d6eac8fca0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 04:07:18 +0000 Subject: [PATCH 5/8] Fix dropdown z-index issue in My Tools table Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com> Agent-Logs-Url: https://github.com/PowerPlatformToolBox/pptb-web/sessions/35f1a7df-135a-4672-afe0-b9731c3dd784 --- app/(authenticated)/dashboard/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(authenticated)/dashboard/page.tsx b/app/(authenticated)/dashboard/page.tsx index 3caaf30..504d574 100644 --- a/app/(authenticated)/dashboard/page.tsx +++ b/app/(authenticated)/dashboard/page.tsx @@ -366,7 +366,7 @@ export default function DashboardPage() { )}
) : ( -
+
@@ -385,7 +385,7 @@ export default function DashboardPage() { {sortedTools.map((tool) => { const analytics = tool.tool_analytics; return ( - + +
Date: Tue, 24 Mar 2026 16:02:37 -0700 Subject: [PATCH 6/8] Update app/(authenticated)/dashboard/page.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/(authenticated)/dashboard/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/(authenticated)/dashboard/page.tsx b/app/(authenticated)/dashboard/page.tsx index 504d574..fead2a3 100644 --- a/app/(authenticated)/dashboard/page.tsx +++ b/app/(authenticated)/dashboard/page.tsx @@ -555,6 +555,8 @@ export default function DashboardPage() { role="dialog" aria-modal="true" aria-labelledby="validation-modal-title" + tabIndex={-1} + autoFocus onKeyDown={(e) => e.key === "Escape" && setValidationModal(null)} >
setValidationModal(null)} /> From 3387f56cc594738e192b95f85262598842ee10b4 Mon Sep 17 00:00:00 2001 From: Danish Naglekar <36135520+Power-Maverick@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:09:28 -0700 Subject: [PATCH 7/8] Update app/(authenticated)/dashboard/page.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- app/(authenticated)/dashboard/page.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/(authenticated)/dashboard/page.tsx b/app/(authenticated)/dashboard/page.tsx index fead2a3..e2674f5 100644 --- a/app/(authenticated)/dashboard/page.tsx +++ b/app/(authenticated)/dashboard/page.tsx @@ -471,9 +471,18 @@ export default function DashboardPage() {
setOpenMoreMenuForToolId(null)} - onKeyDown={(e) => e.key === "Escape" && setOpenMoreMenuForToolId(null)} /> -
+
{ + if (e.key === "Escape") { + setOpenMoreMenuForToolId(null); + } + }} + >
|