Skip to content

Fix excluded filter inheritance for new sessions - #994

Open
heyankitpatel wants to merge 2 commits into
craft-ai-agents:mainfrom
heyankitpatel:fix/excluded-filter-inheritance
Open

Fix excluded filter inheritance for new sessions#994
heyankitpatel wants to merge 2 commits into
craft-ai-agents:mainfrom
heyankitpatel:fix/excluded-filter-inheritance

Conversation

@heyankitpatel

@heyankitpatel heyankitpatel commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Fix new-session filter inheritance so only filters in include mode are considered. Excluded status, label, and project filters now leave new sessions on workspace defaults unless exactly one separate included filter is active.

Fixes #970

Changes

  • extract the inheritance rule into a pure, testable helper
  • ignore excluded filters when collecting inheritance candidates
  • preserve the existing ambiguity fallback when zero or multiple included filters are active
  • add regression coverage for statuses, labels, projects, mixed include/exclude filters, and multiple includes
  • document the user-visible fix in apps/electron/resources/release-notes/next.md

Testing

  • bun test apps/electron/src/renderer/components/app-shell/__tests__/new-session-filter-inheritance.test.ts — 5 passed
  • bun test apps/electron/src/renderer/components/app-shell/__tests__ — 45 passed
  • bun run typecheck:electron — passed
  • package-local ESLint on all changed TypeScript files — 0 errors (existing AppShell.tsx hook warnings remain)
  • bun run lint:electron — current main has 9 errors in unrelated, untouched files; no errors are reported in this PR's changed TypeScript files
  • bun run typecheck:all — cannot complete on current main because packages/core/tsconfig.json extends a root tsconfig.base.json that is absent from the OSS checkout; the affected Electron package type check passes

Screenshots

Not applicable — this changes session creation behavior without visual changes.

heyankitpatel and others added 2 commits July 28, 2026 12:49
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
@heyankitpatel
heyankitpatel marked this pull request as ready for review July 28, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excluded status filter is inherited by new sessions

1 participant