Skip to content

Fix todo retrieval ordering by position#7

Merged
AkshajSinghal merged 1 commit into
TruFoundation:mainfrom
ded-furby:fix-todo-ordering-by-position
Jun 2, 2026
Merged

Fix todo retrieval ordering by position#7
AkshajSinghal merged 1 commit into
TruFoundation:mainfrom
ded-furby:fix-todo-ordering-by-position

Conversation

@ded-furby
Copy link
Copy Markdown
Contributor

Summary

  • order get_all_todos() by the stored position column instead of relying on SQLite row order
  • add a regression test that inserts rows out of order to prove the returned todo list follows position

Closes #5.

Validation

  • python -m pytest tests/test_database.py -k ordered_by_position
  • python -m pytest tests/test_database.py
  • python -m trushell --help
  • trushell --help

Notes

  • python -m pytest on my local macOS environment still hits the pre-existing tests/test_sound.py::test_play_alarm_uses_quiet_subprocess platform assumption (afplay vs paplay).
  • python -m ruff check . currently fails on the repository's existing pyproject.toml target-version = ["py310"] entry, which Ruff 0.15.15 does not parse as valid TOML.

@AkshajSinghal AkshajSinghal merged commit bd49445 into TruFoundation:main Jun 2, 2026
0 of 3 checks passed
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.

get_all_todos() returns todos ordered by insertion, not by position column

2 participants