Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions extensions/accessibility-kanban/extension.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const EXTENSION_NAME = "accessibility-kanban";
const STATE_FILE_PREFIX = "repository-issues-kanban-state";
const COLUMNS = ["backlog", "plan", "ready", "implement", "done"];
const VALID_COLUMNS = new Set(COLUMNS);
const REFRESH_ISSUES_ERROR = "Unable to refresh issues right now. Please try again.";

let repoInfoCache = null;
let githubTokenCache;
Expand Down Expand Up @@ -197,7 +198,7 @@ function normalizeState(rawState, repoInfo = getRepoInfo()) {

return {
repo,
error: repoInfo.error || rawState?.error || null,
error: repoInfo.error || (rawState?.error === REFRESH_ISSUES_ERROR ? REFRESH_ISSUES_ERROR : null),
updatedAt: rawState?.updatedAt || new Date().toISOString(),
generation: rawState?.generation || Date.now(),
columns: Array.isArray(rawState?.columns) && rawState.columns.length ? rawState.columns : COLUMNS,
Expand Down Expand Up @@ -453,9 +454,10 @@ async function refreshIssuesSafe() {
broadcast("state", merged);
return merged;
} catch (error) {
console.error("[accessibility-kanban] Failed to refresh issues", error);
const failed = {
...state,
error: error instanceof Error ? error.message : String(error),
error: REFRESH_ISSUES_ERROR,
};
saveState(failed);
broadcast("state", failed);
Expand Down
Loading