ework-web 0.10.63 → 0.10.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ework-web",
3
- "version": "0.10.63",
3
+ "version": "0.10.64",
4
4
  "type": "module",
5
5
  "description": "ework-web — standalone multi-project issue tracker. Local SQLite-backed, no external API dependency. Bun + TypeScript + SSR HTML.",
6
6
  "license": "MIT",
package/src/giteaApi.ts CHANGED
@@ -153,7 +153,7 @@ export async function handleGiteaApi(
153
153
  const limitRaw = Number(url.searchParams.get("limit") ?? 50);
154
154
  const limit = Number.isFinite(limitRaw) && limitRaw > 0 ? Math.min(limitRaw, 200) : 50;
155
155
  try {
156
- const rows = await listAllIssues({ q, state, limit, viewerLogin: user.login, viewerIsAdmin: user.is_admin === 1 });
156
+ const rows = await listAllIssues({ q, state, limit, viewerLogin: user.login, viewerIsAdmin: caller.is_admin === 1 && user.is_admin === 1 });
157
157
  const body = [];
158
158
  for (const row of rows) {
159
159
  const project = await getProject(row.project_owner, row.project_name);
package/src/index.ts CHANGED
@@ -2260,8 +2260,8 @@ async function handle(req: Request, url: URL, ip: string, ctx: { authed: boolean
2260
2260
  const dispatchCfg = await getConfigAll();
2261
2261
  const dispatchOff = dispatchCfg[`dispatchOff:${owner}/${repo}`] === "1";
2262
2262
  const globalDispatchOff = dispatchCfg["dispatchEnabled"] === "false";
2263
- const processingIssues = await listIssues(project.id, { state: "all" });
2264
- const processingCount = processingIssues.filter((it) => it.ai_status === "processing").length;
2263
+ const running = await getRunningSessionsForProject(`${owner}/${repo}`);
2264
+ const processingCount = new Set(running.map((r) => r.issueNumber)).size;
2265
2265
  return html(buildProjectAiPage(project, dispatchOff, globalDispatchOff, processingCount).html);
2266
2266
  }
2267
2267