Skip to content

Legacy/9.13.1 - #589

Closed
Platinum1154 wants to merge 24 commits into
taskgenius:masterfrom
Platinum1154:legacy/9.13.1
Closed

Platinum1154 wants to merge 24 commits into
taskgenius:masterfrom
Platinum1154:legacy/9.13.1

Conversation

@Platinum1154

Copy link
Copy Markdown

Description

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • I have read and agree to the CLA
  • My code follows the project's style guidelines
  • I have tested my changes
  • I have updated the documentation

Related Issues

Closes #(issue number)

@bitskc

bitskc commented Nov 8, 2026

Copy link
Copy Markdown

Automated Code Review

Risk Level: Medium-High | Verdict: ESCALATE
Recommendation: 🚫 Changes needed — do not merge (head 2408507)

Persona Severity Finding
Security Auditor P3 No injection/secret exposure. CI/release workflow rewrites are the sensitive part: release.yml (deleted on master in c065ed6) is re-added/modified; --ignore-scripts + --frozen-lockfile are improvements. Submodule bump to 3cb5706 matches current taskgenius/calendar main.
Regression Skeptic P1 Base is master but branch is cut from the 9.13.1 tag: CONFLICTING, 441 files / −40k lines vs master, would downgrade 9.14.0-beta.6 → 9.13.2 and resurrect the removed release workflow. Also P2: removeBlankTasks now silently drops empty - [ ] items from the index for every consumer (Repository.updateTasks/…) and migrates persisted snapshots at startup — behavior change for users who keep empty checkboxes.
Performance Critic P2 Orchestrator.ts:484 — every non-error file event now calls augmentor.clearCache() (global) + storage.clearFile(path), defeating incremental caches on every edit. Any index-affecting setting edit triggers a full onSettingsChange(["parser","augment","project"]) rebuild.
Architecture Judge P3 Mixed-indent/one-line code style; t as settingsText alias duplicating existing t; 1,800-key scripts/settings-i18n-keys.json + 547 identity entries in en.ts duplicate source of truth.
QA Lead P2 VALIDATION.zh-CN.md itself reports 146 failing tests / 38 failing suites; CI (jest --runInBand) will be red. New tests are reasonable (status menu, settings invalidation, blank tasks) but nothing covers the new per-file cache-clear path or snapshot-migration in Repository.initialize.
Product Reliability P2 updateSettings changed from void to Promise<void> and can now reject, but FileSourceSettingsSection.ts:783 neither awaits nor catches it and shows "synced" immediately → unhandled rejection and false success. index.ts sidebar refresh loop uses any and unguarded loadTasks.

Opened Issues

  • #590 [Auto-Detected][P1] PR Legacy/9.13.1 #589 targets master but is a 9.13.1-based legacy branch (labels/assignee not applied: reviewer account has read-only access)

Summary

Content is a legacy-line (9.13.x) maintenance release (settings zh-CN, status menu fix, index invalidation) mistakenly proposed against master; merging would regress trunk and re-enable release tooling. Retarget to a legacy branch or split into small PRs rebased on current master. Reviewers should focus on the base branch, Orchestrator.applySettings rebuild/caching behavior, and removeBlankTasks semantics.

if (file) {
if (reason !== "error") {
this.projectResolver.clearCache(path);
this.augmentor.clearCache();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Performance Critic P2: global augmentor.clearCache() + storage.clearFile() on every non-error file event discards incremental caches on each edit.

import type { Task } from "@/types/task";

/** Empty Markdown placeholders must not become indexed tasks or orphan children. */
export function removeBlankTasks(tasks: Task[]): Task[] {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Regression Skeptic P2: empty - [ ] items are now silently dropped from the index for all consumers (repository writes and snapshot restore). Behavior change for users who keep empty checkboxes.

@bitskc

bitskc commented Nov 8, 2026

Copy link
Copy Markdown

Local CI Results

PR: #589 | SHA: 240850716edc0bb275860633384fd626db48fe6e | Ran: 2026-11-08T04:35Z

Replicated .github/workflows/ci.yml (Node v24 host, pnpm 10.26.0, submodule packages/calendar initialised).

Check Status Duration
Install dependencies (pnpm install --frozen-lockfile --ignore-scripts) ✅ 4s
Build (pnpm build:release — i18n check, release-version check, tsc --noEmit, esbuild) ✅ 19s
Tests (pnpm exec jest --runInBand --passWithNoTests) ❌ 18s
Lint ⏭️ not part of ci.yml –

Overall: ❌ 1 check failed

Failures

pnpm exec jest --runInBand --passWithNoTests

Test Suites: 43 failed, 73 passed, 116 total
Tests:       160 failed, 1336 passed, 1496 total

Baseline master (same commands, same host): 135/135 suites, 1718/1718 tests pass. So all 43 failing suites are regressions relative to base (this PR also runs only 116 suites vs 135 on master).

Most frequent error signatures in the PR run:

  • TypeError: (0 , obsidian_1.normalizePath) is not a function (36)
  • TypeError: Cannot read properties of undefined (reading 'onLayoutReady') (16)
  • TypeError: startTime.isValid is not a function (12)
  • ReferenceError: Cannot access 'mockDate' before initialization (10)
  • many expect(...).toBe/toEqual/toContain mismatches, e.g. TagsInheritanceInvestigation.test.ts (task tags empty instead of containing mobility) and FileMetadataInheritanceDebug.test.ts (custom file metadata field testField not inherited, only priority).

Failing suites include: ArchiveActionExecutor., autoCompleteParent, autoDateManager., CanvasTaskUpdater, CompleteActionExecutor, DateInheritance*, FileFilterManager, ProjectConfigManager, ProjectDataWorkerManager, SettingsMigration, TaskIndexer.mtime, TaskWorkerManager.mtime, TaskParsingService.integration, taskParser, TimeParsing*, EnhancedTimeParsing*, ics-*, workflow, and others.

Likely cause: the PR branch diverges from master (merge-base 7d8e83bd; master has 44 commits not in this branch), and the obsidian mock / test setup plus metadata-inheritance behaviour on the legacy branch no longer match what these tests expect. Fixes on master for the mock (normalizePath, Workspace.onLayoutReady, moment isValid) are probably missing here.

Warnings

  • tsc/vite-dts: API Extractor warns bundled TS 5.4.2 is older than project TS 5.9.3 (calendar package).
  • dist/main.js is 4.0 MB (esbuild size warning).

@bitskc

bitskc commented Nov 9, 2026

Copy link
Copy Markdown

Automated Code Review

Re-review — previous review covered 2408507; this one covers head 3781a74 (9.13.2 → 9.13.10: +224 files vs. last-reviewed SHA).

Risk Level: High | Verdict: ESCALATE
Recommendation: 🚫 Changes needed — do not merge

Persona Severity Finding
Security Auditor P2 New src/integrations/habits/ai-summary.ts POSTs habit names/stats via requestUrl to a user-configurable baseUrl (default https://api.openai.com/v1) with a plaintext apiKey stored in plugin data; no https enforcement for remote hosts. Also ~29k lines of vendored third-party code and new deps (jspdf, chart.js, chartjs-chart-matrix) widen supply-chain surface. scripts/audit-native-points.cjs evaluates vault-derived text via vm.runInNewContext (dev-only, local).
Regression Skeptic P1 Still CONFLICTING vs master from a 9.13.1 base; would downgrade trunk and keep release.yml that master removed (see #590). Gantt/Fluent/Project views, calendar patching (scripts/patch-calendar.cjs now gates build), task editing and index updates are rewritten in the same PR.
Performance Critic P2 Unchanged from last review: per-file-event augmentor.clearCache() + storage.clearFile(path) in Orchestrator.ts:462-463. Gantt now rebuilds range/prepare/render on every scale change (setProjectScale).
Architecture Judge P2 Vendored Habits plugin (own settings, 3.2k-line CSS, AI client, i18n) inlined in core with no isolation/flag; one-line/mixed style code (e.g. Gantt controls); 5k-line audit inventory JSON and 14 release-note docs committed.
QA Lead P1 docs/test-failures-9.13.9.md records 145 failing tests / 39 failing suites accepted as "existing"; ci.yml runs jest so CI is red; root causes unverified. CLA check fails.
Product Reliability P2 Prior finding persists: FileSourceSettingsSection.ts:783 calls orchestrator.updateSettings(...) without await/catch and reports success. AI summary errors are surfaced only by message text; no timeout on requestUrl.

Opened Issues

  • #593 [Auto-Detected][P1] PR Legacy/9.13.1 #589 grew to 224 files / +47k lines with 145 known-failing tests and unreviewed vendored Habits + AI client (labels/assignee not applied: reviewer account lacks permissions)
  • Existing: #590 — base-branch mismatch still unresolved

Summary

The PR keeps growing as a legacy-line release branch targeted at master. It remains unmergeable (conflicts, base mismatch, red CI) and is too large to review as a unit. Retarget to a legacy branch or split into rebased PRs (habits, points/rewards, calendar/gantt UI, mobile layout, i18n); fix or quarantine the 145 failing tests first.

@bitskc

bitskc commented Nov 9, 2026

Copy link
Copy Markdown

Local CI Results

PR: #589 | SHA: 3781a74214cdcea3bf78fc3d00979f8a233bcb98 | Ran: 2026-11-09 14:41 UTC

Replicated .github/workflows/ci.yml locally (node v24, pnpm 10.26.0, submodules initialised).

Check Status Duration
Install dependencies (pnpm install --frozen-lockfile --ignore-scripts) ✅ 2s
Build (pnpm build:release: calendar patch, i18n check, release-version check, tsc -noEmit, esbuild) ✅ 22s
Habits tests (pnpm test:habits) ✅ 3s
UI regression tests (pnpm test:ui) ✅ 5s
Jest (pnpm exec jest --runInBand --passWithNoTests) ❌ 22s

Overall: ❌ 1 check failed

Failures

pnpm exec jest --runInBand --passWithNoTests

42 of 130 suites failed; 155 of 1559 tests failed (1404 passed).

      282 | }
      283 |
    > 284 | export class ProjectCreateModal extends Modal {
          |                                         ^
      285 | 	constructor(app: App, private manager: ProjectFileManager, private onSave: () => void) { super(app); }
      286 | 	onOpen() {
      287 | 		this.setTitle(t("New project")); const folder = projectFolderPicker(this.contentEl, this.manager, ""); let name = "", description = "", color = "#5985b1";

      at Object.<anonymous> (src/managers/project-file-manager.ts:284:41)
      at Object.<anonymous> (src/utils/file/file-operations.ts:4:1)
      at Object.<anonymous> (src/__tests__/dateTemplates.test.ts:1:1)

FAIL src/__tests__/TimelineSidebarView.test.ts
  ● Test suite failed to run

    Cannot find module '../components/MarkdownRenderer' from 'src/__tests__/TimelineSidebarView.test.ts'

      56 | }));
      57 |
    > 58 | jest.mock('../components/MarkdownRenderer', () => ({
         |      ^
      59 | 	MarkdownRendererComponent: class MockMarkdownRendererComponent {},
      60 | }));
      61 |

      at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (src/__tests__/TimelineSidebarView.test.ts:58:6)

FAIL src/__tests__/QuickCaptureModal.integration.test.ts
  ● Test suite failed to run

    Cannot find module '../components/AutoComplete' from 'src/__tests__/QuickCaptureModal.integration.test.ts'

      119 | }));
      120 |
    > 121 | jest.mock("../components/AutoComplete", () => ({
          |      ^
      122 | 	FileSuggest: jest.fn(),
      123 | 	ContextSuggest: jest.fn(),
      124 | 	ProjectSuggest: jest.fn(),

      at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (src/__tests__/QuickCaptureModal.integration.test.ts:121:6)


Test Suites: 42 failed, 88 passed, 130 total
Tests:       155 failed, 1404 passed, 1559 total
Snapshots:   0 total
Time:        18.961 s
Ran all test suites.

Failure causes (unique error counts from the log, each printed twice in the summary):

  • obsidian_1.normalizePath is not a function (18): the obsidian mock lacks normalizePath. Affects Archive/Delete/Move/Duplicate action executors, Canvas updater, etc.
  • Cannot read properties of undefined (reading 'onLayoutReady') (8)
  • startTime.isValid is not a function (6): moment mock gap.
  • Cannot access 'mockDate' before initialization (5): jest.mock hoisting issue.
  • vault.getFileByPath / indexer.updateIndexWithTasks is not a function (4 each): mocks or tests out of date with the source.
  • Cannot find module '../components/MarkdownRenderer' and '../components/AutoComplete': TimelineSidebarView.test.ts and QuickCaptureModal.integration.test.ts mock modules that no longer exist at those paths.
  • Class extends value undefined (src/managers/project-file-manager.ts:284, ProjectCreateModal extends Modal): the obsidian mock has no Modal export. It breaks dateTemplates.test.ts via file-operations.ts.

Likely cause: the jest obsidian mock and several test files are stale against the refactored src/ (moved or removed components, new normalizePath/Modal usage). Not checked whether master fails the same way.

Warnings

  • dist/main.js is 5.5mb (esbuild size warning).

@bitskc

bitskc commented Nov 15, 2026

Copy link
Copy Markdown

Local CI Results

PR: #589 | SHA: 295a743c2c9b63160db9adaf4a653722686de3cb | Ran: 2026-11-15 UTC

Replicated .github/workflows/ci.yml steps (pnpm workspace; local Node v24 vs CI's Node 20).

Check Status Duration
Install dependencies (pnpm install --frozen-lockfile --ignore-scripts) ✅ 4s
Build (pnpm build:release) ✅ 22s
Habits tests (pnpm test:habits) ✅ 67/67 3s
UI regression tests (pnpm test:ui) ✅ 84/84 5s
Jest (pnpm exec jest --runInBand --passWithNoTests) ❌ 155 failed / 1405 passed, 42/130 suites 21s

Overall: ❌ 1 check failed

Failures

pnpm exec jest --runInBand --passWithNoTests

Test Suites: 42 failed, 88 passed, 130 total
Tests:       155 failed, 1405 passed, 1560 total
Time:        18.272 s

Failure categories (deduplicated from log):

  • TypeError: (0, obsidian_1.normalizePath) is not a function (18) — the obsidian jest mock lacks normalizePath. Breaks Archive/Delete/Move/Duplicate canvas action executors, CanvasTaskUpdater, taskParser, workflow tests.
  • Cannot read properties of undefined (reading 'onLayoutReady') (8) — mock workspace/app objects missing onLayoutReady.
  • startTime.isValid is not a function (6) — moment mock gap in date/time parsing tests.
  • ReferenceError: Cannot access 'mockDate' before initialization (5) — jest.mock hoisting issue (const referenced inside factory before init).
  • this.vault.getFileByPath is not a function (4) — vault mock missing getFileByPath.
  • indexer.updateIndexWithTasks is not a function (4) — indexer mock out of date.
  • Class extends value undefined (2) — project-file-manager.ts:284 ProjectCreateModal extends Modal; obsidian mock has no Modal export. Breaks dateTemplates.test.ts via file-operations.ts.
  • Cannot find module '../components/MarkdownRenderer' — TimelineSidebarView.test.ts mocks a module that no longer exists.
  • Cannot find module '../components/AutoComplete' — QuickCaptureModal.integration.test.ts mocks a moved/removed module.
  • Canvas executor tests also throw on missing deleteCanvasTask/moveCanvasTask/duplicateCanvasTask mock methods.

Analysis: identical failure set to the previous run (SHA 3781a74, 155/42). The jest obsidian/vault/indexer mocks and several test files are stale against the refactored src/ — new normalizePath, Modal, getFileByPath usage plus moved components. Pre-existing test-suite rot on this legacy branch, not introduced by the new commits. Already tracked in issues #591 / #594.

Warnings

  • dist/main.js is 5.6mb (esbuild size warning).

@bitskc

bitskc commented Nov 15, 2026

Copy link
Copy Markdown

Automated Code Review

Re-review — previous reviews covered 2408507 and 3781a74; this one covers head 295a743 (9.13.10 → 9.13.12: +687/−228 across 28 files vs. last-reviewed SHA).

Risk Level: High | Verdict: ESCALATE
Recommendation: 🚫 Changes needed — do not merge

Persona Severity Finding
Security Auditor — No new findings in the delta. Prior finding stands: plaintext apiKey + user-configurable baseUrl for the habits AI-summary POST remains in the branch.
Regression Skeptic P1 Still CONFLICTING vs master; the merge would still downgrade trunk and resurrect release.yml (absent on master, +72 lines in this branch). New: watchHabitFiles narrows re-render triggers to habit-folder paths only, removing the external-note refresh both habits dashboards relied on → stale views (issue #598). FluentDataManager snapshot dedupe can suppress onTasksLoaded on view/context changes (issue #599).
Performance Critic P3 Prior augmentor.clearCache()/storage.clearFile(path) per-event finding persists. Delta improves habits dashboards (event-driven replace of always-refresh) and dedupes duplicate task-snapshot repaints — net positive, but lastSnapshot is never invalidated on view switches.
Architecture Judge P2 New workflow helpers (getTaskStatusGroup, getNextTaskStatusMark, getPausedTaskMarks) correctly centralize status-group logic previously duplicated in TableRenderer/TaskStatusIndicator/icon-manager — good refactor. Unchanged: unmergeable 100-file PR mixing vendored habits, release notes, and UI features.
QA Lead P1 ci.yml still runs jest; ~155 tests / 42 suites were failing at 3781a74 per prior review's local run and no delta commit addresses them (the only test change adds coverage). Two good new regression tests added (tests/ui-audit/regressions.test.mjs, WriteAPI.optional-datetime.test.ts).
Product Reliability P2 cycleTaskStatus errors surface only as a Notice; on failure the checkbox re-enables but the file write may have partially applied. Debounced requestDataRefresh no longer fires onUpdateNeeded — by design — but means a no-op snapshot leaves the view un-updated after batch ops if the caller needed a re-filter.

Delta assessment (3781a74 → 295a743)

Positive: calendar checkboxes now cycle through the configured workflow instead of hardcoding " "/"x" (fixing a real inconsistency); rescheduleHabit/setRecord gained optimistic-concurrency guards inside processFrontMatter; habit dashboard refresh is now event-driven; pause-icon CSS generation moved off regex-based body-class rewriting.

Regressions: watchHabitFiles drops the external-note invalidation noted in the removed code's own comment; snapshot dedupe lacks view-id invalidation.

Opened Issues

  • #598 — Habits dashboards only re-render on habit-file changes; external note edits go stale
  • #599 — FluentDataManager snapshot dedupe can swallow view updates
  • Still open: #590 (base-branch mismatch), #593 (size/red CI) — both unresolved at this SHA.

Summary

The 9.13.12 delta is competent, targeted work — workflow-aware status cycling is the right fix — but it lands on a PR that remains unmergeable: CONFLICTING vs master, a trunk downgrade in the diff, and a red jest CI. Nothing here can merge as-is. Retarget to a legacy branch or split into rebased PRs (calendar/status-cycle, habits fixes, fluent dedupe); the delta changes would review cleanly at Low/Medium in isolation.

const current = snapshot();
const changedPaths = [...new Set([...previous.keys(), ...current.keys()])]
.filter(path => current.get(path) !== previous.get(path));
if (!changedPaths.length) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 [Regression Skeptic] [P2]: Re-renders and savedValues/savedDays invalidation are now gated on isHabitFile(path) — the code this replaced explicitly refreshed on every metadataCache change because note habits derive completion from notes outside the habits folder. External note edits now leave the dashboards stale until an unrelated habit file changes.

const projects = viewId === "projects" || viewId === "gantt"
? new ProjectFileManager(this.plugin.app).list().map(({ file, ...project }) => ({ ...project, path: file.path }))
: undefined;
const snapshot = JSON.stringify([loadedTasks, projects]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 [Regression Skeptic] [P3]: lastSnapshot is only keyed on [tasks, projects] and never invalidated on view switches or filter/settings changes — a cache event for view B can match a snapshot captured under view A and suppress onTasksLoaded, leaving the new view un-updated. Include viewId/filter fingerprint in the key or reset on view change. Also showingLoading is shared across concurrent loadTasks calls, so an interleaved background load can leave a loading overlay up.

9.13.13 保留旧完成和进行中符号兼容
@bitskc

bitskc commented Nov 15, 2026

Copy link
Copy Markdown

Automated Code Review

Re-review — previous reviews covered 2408507, 3781a74, and 295a743; this one covers head fdb47303 (9.13.12 → 9.13.13 compatibility patch: +16/−6 across 6 files vs. last-reviewed SHA).

Risk Level: High | Verdict: ESCALATE
Recommendation: 🚫 Changes needed — do not merge

Persona Severity Finding
Security Auditor — No new findings in the delta. Prior finding stands: plaintext apiKey + user-configurable baseUrl for the habits AI-summary POST remains in the branch.
Regression Skeptic P1 Still dirty/unmergeable vs master — the merge would still downgrade trunk (issue #590, unresolved). Delta itself is a safe additive fallback.
Performance Critic — None. Delta adds one constant map lookup.
Architecture Judge — None. The defaults map for legacy marks (X, >, a, -) is the right place for the fix — one guard in the shared resolver rather than per-caller special-casing.
QA Lead — Delta is covered: 4 new assertions in tests/ui-audit/regressions.test.mjs. Verified locally at fdb47303 — all 83 UI-audit tests pass. The pre-existing jest suite rot (155 failing / 42 suites, issue #594) is unchanged — no delta commit addresses it.
Product Reliability — None. getTaskStatusGroup now returns a group for legacy marks instead of undefined, strictly widening coverage; behavior for configured marks is unchanged.

Delta assessment (295a743 → fdb4730)

Single-commit compat patch: getTaskStatusGroup gains a defaults fallback so legacy/foreign marks (x, X, >, /, ?, a, -, ) resolve to status groups even when the user's configured taskStatusMarks/statusCycles don't contain them — e.g. notes synced from other plugins or older file versions. getNextTaskStatusMark('X') → = and '>' → x per the tests. Version bumped to 9.13.13 consistently across manifest.json, manifest-beta.json, package.json, versions.json. This is a competent, minimal fix and would review CLEAN in isolation.

Opened Issues

None new. Still open and unresolved at this SHA: #590 (base-branch mismatch), #593 (size/red CI), #594 (jest failures), #598 (habits dashboard stale views), #599 (FluentDataManager snapshot dedupe). None of the delta files touch #598/#599 codepaths.

Summary

The 9.13.13 delta is a clean, well-tested legacy-mark compatibility fix — but the PR remains unmergeable (dirty vs master, trunk downgrade, red jest). Same recommendation as before: retarget to a legacy base or split into rebased PRs; each delta would pass review on its own.

@bitskc

bitskc commented Nov 15, 2026

Copy link
Copy Markdown

Local CI Results

PR: #589 | SHA: fdb47303e7728fcb0d29b652cc4e68230c7ac8d2 | Ran: 2026-11-15 09:35 UTC

Replicated .github/workflows/ci.yml (Node 24, pnpm 10.26.0, submodules, pnpm install --frozen-lockfile --ignore-scripts).

Check Status Duration
Install dependencies ✅ 2s
Build (pnpm build:release: tsc --noEmit + esbuild + i18n/version checks) ✅ 21s
Habits tests (pnpm test:habits) ✅ 67/67 1s
UI regression tests (pnpm test:ui) ✅ 84/84 4s
Jest (pnpm exec jest --runInBand --passWithNoTests) ❌ 1404 pass / 156 fail, 42/130 suites 19s

Overall: ❌ 1 check failed

Failures

pnpm exec jest --runInBand --passWithNoTests

Base comparison: identical jest run on master (c065ed6) passes 135/135 suites, 1718/1718 tests — all 156 failures are introduced by this PR's merge.

Failing suites include: ArchiveActionExecutor.*, CanvasTaskUpdater, CompleteActionExecutor, DateInheritance*, Delete/Duplicate/MoveActionExecutor.canvas, EnhancedTimeParsing*, FileFilterManager, ProjectConfigManager, ProjectDataWorkerManager, ProjectDetectionFixes, QuickCaptureModal.integration, SettingsMigration, SuggestBackwardCompatibility, TagsInheritanceInvestigation, TaskIndexer.mtime, TaskMetadataUtils, TaskParsingService.integration, TaskWorkerManager.mtime, and ~20 more.

Representative errors:

TypeError: (0 , obsidian_1.normalizePath) is not a function   (36 cases — src/__mocks__/obsidian.ts missing export)
TypeError: Cannot read properties of undefined (reading 'onLayoutReady')   (16)
TypeError: startTime.isValid is not a function   (12 — rewritten moment mock)
TypeError: this.vault.getFileByPath is not a function   (8)
ReferenceError: Cannot access 'mockDate' before initialization   (10 — broken test setup, ArchiveActionExecutor.markdown.test.ts:52)
Cannot find module '../components/MarkdownRenderer' / '../components/AutoComplete'   (components removed but suites kept)
+ ~122 assertion diffs (status cycling, inheritance, parsing, canvas ops)

Analysis

The PR rewrites src/__mocks__/obsidian.ts (custom momentFn replacing real moment behavior, missing normalizePath/TFolder API surface) and deletes ~15 test files while keeping suites that reference removed components (MarkdownRenderer, AutoComplete) — so a large share of failures are stale/broken test scaffolding rather than verified regressions. However ~120+ assertion diffs in status-cycling, metadata-inheritance, and parsing paths need real triage.

The PR itself documents this state: docs/test-failures-9.13.9.md catalogs 145 known failures on the legacy line since 9.13.8 and notes CI's own run showed 150 failures. So this is a known, carried-forward failure set, not a new surprise — but it does mean merging this PR turns master's jest suite from all-green to ~12% failing.

@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@bitskc

bitskc commented Nov 29, 2026

Copy link
Copy Markdown

Automated Code Review

Re-review — previous reviews covered 2408507, 3781a74, 295a743, fdb47303; this one covers head 74c26f3d (9.13.13 → 9.13.15: +281/−48 across 16 files vs. last-reviewed SHA, 2 commits).

Risk Level: High | Verdict: ESCALATE
Recommendation: 🚫 Changes needed — do not merge

Persona Severity Finding
Security Auditor — No new findings in the delta. Prior finding stands (plaintext apiKey + configurable baseUrl in habits AI summary).
Regression Skeptic P1 Still CONFLICTING/DIRTY vs master; trunk downgrade unresolved (#590). New P2: parseRewardCatalog positional fallback (lines.length === original.length) binds an unmatched new line to a deleted reward. Reproduced in isolation: replacing reward Tea -20 | 3 with plain wish Coffee throws "Check the reward details"; replacing it with Coffee -5 | 2 silently inherits the deleted reward's id, occurrence, imageUrl, condition (issue #722).
Performance Critic — None.
Architecture Judge P3 Reward identity is carried by a free-text DSL (name -cost | stock) with heuristic matching; per-reward Edit/Delete buttons and PointRewardModal removed. el.oncontextmenu = … property assignment in calendar handleTGRenderEvent bypasses registerDomEvent (benign; replaced on re-render). Mixed tab/space indentation again in new code.
QA Lead P2 Good new tests (reward-catalog, points-service, calendar menu across month/week/day, managed calendars). Missing: delete+add with equal row count, wish replacing reward, malformed stored wish. jest suite rot (#594) unchanged; I did not run the suite here.
Product Reliability P2 readRow(original[j].text) is applied to stored wishes during matching; a stored wish like Bad - 5 | x makes every save throw, leaving the editor unusable until the data file is hand-edited. Removing a line deletes a reward (image/condition/stock) without confirmation. saveRewardCatalog rollback path calls saveSettings() again without guarding, so a second failure masks the original error.

Delta assessment (fdb4730 → 74c26f3)

Positive: calendar task context menu now fires from title/badge/checkbox surfaces exactly once (stopPropagation + preventDefault only when a handler exists), uses the current task from this.tasks; ViewComponentManager falls back to onTaskContextMenu for managed calendars (fixes a real unwired menu); saveRewardCatalog does optimistic-concurrency checks and rolls back settings if the data-file write fails.
Regression: reward editor matching flaws above.

Opened Issues

Summary

The 9.13.14–9.13.15 delta fixes calendar context menus competently, and the reward-shop rewrite is mostly sound, but its row-matching heuristic can mis-assign or reject edits (#722). The PR itself remains unmergeable (conflicts with master, trunk downgrade, red jest). Retarget to a legacy base or split into rebased PRs.

if (matches[i] !== undefined) continue;
const j = [...remaining].find(j => match(i, j));
if (j !== undefined) { matches[i] = j; remaining.delete(j); }
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Regression Skeptic P2: positional fallback assigns unmatched new row to a deleted reward (inherits id/metadata) or throws on plain wishes; see #722

@bitskc

bitskc commented Nov 29, 2026

Copy link
Copy Markdown

Local CI Results

PR: #589 | SHA: 74c26f3d18094c6766da0dbd2c0832468fad59ba | Ran: 2026-11-28 UTC

Replicated .github/workflows/ci.yml (pnpm 10.26.0, submodules, --frozen-lockfile --ignore-scripts). Node v24 locally vs. 20 in CI.

Check Status Duration
Install dependencies ✅ 50s
Build (pnpm build:release: calendar build, i18n/release checks, tsc --noEmit, esbuild) ✅ 25s
Habits tests (pnpm test:habits) ✅ 67/67 ~2s
UI regression tests (pnpm test:ui) ✅ 89/89 ~7s
Jest (jest --runInBand) ❌ 43 suites / 158 tests failed (88 suites / 1414 tests passed) 86s

Overall: ❌ 1 check failed

Failures

npx jest --runInBand --passWithNoTests

Test Suites: 43 failed, 88 passed, 131 total. Tests: 158 failed, 1414 passed, 1572 total.

Most common error signatures (occurrence counts in the log):

36  TypeError: (0 , obsidian_1.normalizePath) is not a function
16  TypeError: Cannot read properties of undefined (reading 'onLayoutReady')
12  TypeError: startTime.isValid is not a function
10  ReferenceError: Cannot access 'mockDate' before initialization
 8  TypeError: this.vault.getFileByPath is not a function
 8  TypeError: indexer.updateIndexWithTasks is not a function
 2  Cannot find module '../components/MarkdownRenderer' (TimelineSidebarView.test.ts)
 2  Cannot find module '../components/AutoComplete' (QuickCaptureModal.integration.test.ts)

Analysis: failures are test-harness/mocking drift rather than product code. The obsidian mock lacks normalizePath, Vault.getFileByPath and workspace.onLayoutReady. Some tests reference moved or removed modules (components/MarkdownRenderer, components/AutoComplete, indexer.updateIndexWithTasks). One mock hoisting bug (mockDate) also shows up. This is the same family as the existing open issue #600. The count rose from 156 failures / 42 suites to 158 / 43.

Warnings

@Quorafind

Copy link
Copy Markdown
Member

Thank you for all the work on the 9.13.x line! master has moved on to 10.x, so this legacy branch can't be merged here, and I'm closing it.

@Quorafind Quorafind closed this Nov 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants