Skip to content

Bug: faf todo references no-longer-required faf improve command #2

@Wolfe-Jam

Description

@Wolfe-Jam

Bug: faf todo command references no-longer-required faf improve command

Summary

The faf todo command's error messages and help text reference a command called faf improve which no longer exists, causing confusion for users.

Impact

  • Users see error messages telling them to run faf improve
  • Running faf improve fails (command not found)
  • Creates confusion loop where error message suggests non-working solution
  • Affects all users trying to use the todo system

Bug Details

Affected Command

faf todo (all options: default, --show, --complete, --reset)

Error Messages Affected

All 6 error messages in src/commands/todo.ts:

  1. Line 61: After generating plan

    Try: faf improve --show - View your todo list
    
  2. Line 141: Completion instructions

    Complete tasks with: faf improve --complete <task-number>
    
  3. Line 151: No list exists (--show)

    No active improvement plan. Run faf improve to create one.
    
  4. Line 171: No list exists (--complete)

    No active todo list. Run faf improve first.
    
  5. Line 189: Task not found

    Use faf improve --show to see available tasks.
    
  6. Line 232: After reset

    Run faf improve to create a new one.
    

Root Cause

Historical: The todo command was likely renamed from improve to todo but error messages weren't updated.

Additional Bug Found During Testing

When user provides invalid task number (e.g., faf todo --complete 99), the command crashes with:

taskIdentifier.toLowerCase is not a function

Cause: Task number is passed as number, but code assumes string when doing partial title matching.

Reproduction

Test 1: Ghost Command References

faf init
faf todo
# Shows: "Try: faf improve --show"
# Should say: "Try: faf todo --show"

Test 2: Invalid Task Number Crash

faf init
faf todo
faf todo --complete 99
# Crashes with: taskIdentifier.toLowerCase is not a function

Fix Applied

Changes in src/commands/todo.ts

1. Updated all 6 references:

- faf improve
+ faf todo

2. Fixed type conversion bug:

  } else {
-   // Try to find by partial title match
+   // Try to find by partial title match (convert to string first)
+   const identifier = String(taskIdentifier);
    task = todoList.items.find(item =>
-     item.title.toLowerCase().includes(taskIdentifier.toLowerCase())
+     item.title.toLowerCase().includes(identifier.toLowerCase())
    );
  }

Testing

Test Results

  • ✅ All 173 tests passing
  • ✅ All 20 edge case audits passing
  • ✅ Build successful (TypeScript compiles cleanly)
  • ✅ Manual testing:
    • faf todo → correct help text
    • faf todo --show (no list) → correct error message
    • faf todo --complete 99 → graceful error (no crash)
    • faf todo --complete 1 → works correctly
    • faf todo --reset → correct help text

Test Build

Created faf-cli-3.0.3.tgz for user testing before publishing.

Cascade Effect

This bug also affected AI assistants (like Claude Code) who:

  1. Read the error messages
  2. Suggested users run faf improve
  3. Users tried it and failed
  4. Created confusion loop

Once CLI is fixed, AI assistants will automatically learn the correct command.

Version

  • Affected: v3.0.0 - v3.0.3
  • Fixed in: v3.0.4 (pending release)
  • Files changed: src/commands/todo.ts (8 lines modified)

Reporter

User feedback via WhatsApp testing session (Paul Cowen)

Related

  • User experienced score stuck at 33% → 76% (todo system worked, just confusing UX)
  • Bug prevented users from completing todo tasks due to wrong command name

Status: Fixed, awaiting user confirmation before v3.0.4 release
Priority: Medium (UX blocker, but workaround exists: just use faf todo instead)
Category: Bug - User Experience

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions