Skip to content

fix: default tasks list to today#92

Merged
TonyCasey merged 4 commits intomainfrom
87
Jan 30, 2026
Merged

fix: default tasks list to today#92
TonyCasey merged 4 commits intomainfrom
87

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Jan 30, 2026

Summary

  • default tasks list to --since today when no date filters are provided
  • add --all to fetch older tasks explicitly
  • add unit tests for default and --all behaviors

Testing

  • node --import tsx --test tests/unit/src/lib/skills/shared/services/TaskCliService.test.ts

Linked Issues

Closes #87

Summary by CodeRabbit

  • New Features

    • Added --all flag to the tasks list command, allowing users to view all tasks instead of defaulting to today's tasks only.
  • Documentation

    • Updated configuration documentation to clarify that group IDs are derived and normalized from project folder paths.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 30, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR adds a --all flag to the tasks list command to display all tasks, disabling the default "since today" filter. It includes updates to group ID normalization documentation, implements append-only task storage, adds resource cleanup for neo4j connections, modifies directory traversal logic for project detection, and introduces comprehensive test coverage for the new date-filtering behavior.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/configuration.md, src/project/.lisa/skills/tasks/SKILL.md
Updated user-facing documentation to reflect group ID normalization semantics and new --all and --since flags for the tasks list command with default "since today" behavior.
CLI Flag Handling
src/lib/cli.ts, src/lib/skills/tasks/tasks.ts
Added --all flag support to tasks list command, propagating it through CLI argument parsing and into cliService invocation payload.
Date Filtering Logic
src/lib/skills/shared/services/TaskCliService.ts
Implemented default "since today" filtering when no date range or --all flag is provided; defaults behavior is now controllable via the new all?: boolean interface property.
Group ID Utilities
src/lib/skills/shared/utils/group-id.ts
Reworked directory traversal in findLisaDir to search to filesystem root instead of fixed depth limit; updated JSDoc to clarify return of canonical plus legacy group IDs.
GitHub Skills Enhancement
src/lib/skills/github/github.ts
Implemented append-only task storage pattern (skip updates when task exists), added explicit neo4j disconnect in finally block for resource cleanup, enhanced groupId resolution from CLI arguments with fallback to getCurrentGroupId.
Unit Tests — Behavior Validation
tests/unit/src/lib/skills/shared/services/TaskCliService.test.ts
Added comprehensive test coverage for default date filtering: verifies "since today" default when no filters applied, and verifies absence of since filter when --all flag is set.
Unit Tests — Refactoring
tests/unit/src/lib/commands/doctor.test.ts, tests/unit/src/lib/skills/github/github.test.ts, tests/unit/src/lib/skills/shared/utils/group-id.test.ts
Updated test assertions to validate normalized group IDs, changed GitHub test expectations to reflect idempotent (no-update) behavior, and renamed test descriptions for clarity.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CLI as CLI Parser
    participant TaskSvc as TaskCliService
    participant TaskRepo as TaskService
    participant DB as Database

    Note over User,DB: Scenario: lisa tasks list (no flags)
    User->>CLI: tasks list
    CLI->>TaskSvc: run({all: false})
    TaskSvc->>TaskSvc: effectiveSince = parseDate('today')
    TaskSvc->>TaskRepo: list(groupIds, limit, {since: today})
    TaskRepo->>DB: query since=today
    DB-->>TaskRepo: filtered tasks
    TaskRepo-->>TaskSvc: tasks since today
    TaskSvc-->>CLI: display results

    Note over User,DB: Scenario: lisa tasks list --all
    User->>CLI: tasks list --all
    CLI->>TaskSvc: run({all: true})
    TaskSvc->>TaskSvc: effectiveSince = undefined
    TaskSvc->>TaskRepo: list(groupIds, limit, {})
    TaskRepo->>DB: query all tasks
    DB-->>TaskRepo: all tasks
    TaskRepo-->>TaskSvc: all tasks
    TaskSvc-->>CLI: display all results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A flag called --all hops into view,
Tasks old and new, no filter restraint,
But "since today" becomes the default clue,
While neo4j cleanup prevents constraint,
The rabbit declares: "List tasks with grace!" ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 87

Comment @coderabbitai help to get the list of available commands and usage tips.

@TonyCasey TonyCasey marked this pull request as ready for review January 30, 2026 20:01
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@tests/unit/src/lib/skills/shared/services/TaskCliService.test.ts`:
- Around line 11-17: Remove the unused type import ITaskWriteOptions from the
import list in TaskCliService.test.ts; edit the import block that currently
lists ITaskService, ITaskListResult, ITaskWriteResult, ITaskLinkResult,
ITaskWriteOptions and delete only ITaskWriteOptions so the test no longer
imports an unused symbol.

Base automatically changed from 88 to main January 30, 2026 20:19
TonyCasey and others added 4 commits January 30, 2026 20:22
When running tasks list without date filters, default to since today while allowing --all to fetch older tasks. Update CLI/skill docs and add unit tests for the default and --all behavior.
- Clarify docs that group IDs are normalized, not raw paths
- Remove 10-level depth limit in findLisaDir; traverse to filesystem root
- Guard fs.statSync with try-catch for race/permission errors
- Validate --group flag is a non-empty string before use in github.ts
- Update getGroupIds JSDoc to reflect canonical + legacy return
- Strengthen doctor test assertions to compare exact normalized group ID
- Rename all group-id test cases to method_givenCondition_shouldOutcome

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Skip update when task already exists to prevent duplicates from
  append-only storage pattern (idempotent create)
- Add neo4jClient.disconnect() in finally block to prevent connection
  pool leak

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@TonyCasey TonyCasey merged commit 30f6e10 into main Jan 30, 2026
1 of 2 checks passed
@TonyCasey TonyCasey deleted the 87 branch January 30, 2026 20:24
@TonyCasey TonyCasey mentioned this pull request Jan 31, 2026
4 tasks
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.

bug: lisa tasks list should default to --since today

1 participant