# Changelog

## Unreleased

- No unreleased changes yet.

## 0.1.5 beta 6 - 2026-05-05

### Review Flow

- `Review Flagged` on the ready screen and `Cards -> Review Flagged Cards` now
  start an unscheduled, randomised pass through flagged cards. The pass includes
  flagged cards whether or not they are scheduled, excludes suspended and
  deferred cards, and leaves flags in place for manual follow-up.
- Cards can now be deferred until tomorrow during the prompt phase of a review
  pass, before the answer is revealed. The action removes the current card from
  the current pass and leaves its stored schedule otherwise unchanged. `Ctrl+D`
  now toggles deferral from the ready list and defers the current card during
  the prompt phase of review. If all cards in a pass are deferred before any
  answer is recorded, Cosimo now shows a notice instead of silently returning to
  the ready screen.
- Generated reverse-card actions now keep the ready-list selection on the
  parent card when a reverse card is removed. Reversal menu and context-menu
  choices also hide impossible actions: non-reversible cards offer allowing
  reversal again instead of Make Reversible, and generated reverse cards no
  longer expose the parent-card non-reversible action.
- `Cards -> Make Possible Cards Reversible` is now disabled when no cards are
  eligible, and the command no longer opens a zero-card confirmation if reached
  from stale menu state.
- Confirmation prompts now use Cosimo's own modal dialog instead of native
  `wxMessageDialog` Yes/No buttons, avoiding repeated prompts when No is
  pressed on affected Windows builds.

### Learning Dashboard and Reports

- `File -> Learning Dashboard` now includes review activity: stored answers,
  days with answers, average answers per active day, recorded passes, answers
  in recorded passes, unique cards reviewed in recorded passes, total review
  time, average answers per recorded pass, average time per recorded pass, and
  average time per answer in recorded passes.
- Learning dashboard review activity now uses clearer labels such as stored
  answers, days with answers, and answers in recorded passes. When old review
  events exist without pass timing, the dashboard now shows an older-answers
  line; that line is hidden for decks where the value is zero.
- The learning dashboard now has a `Save Report` button that writes the current
  dashboard text to `reports/`, named from the deck file stem and generation
  time. Reports include the full deck path and avoid overwriting existing
  reports.

### Interface

- The Windows tray context menu now uses wxdragon's automatic taskbar menu path
  instead of opening a manual popup from the right-click callback, reducing the
  amount of tray-object lifetime work happening inside tray mouse events. Tray
  restore and quit handling should now avoid the wxWidgets debug alerts and
  orphaned process cases seen with the previous manual tray popup handling.
- The review screen now uses larger fonts for core review controls, larger
  button hit targets, and compact rating grids while keeping native colours so
  operating-system light, dark, and high-contrast themes stay in control. The
  report-style statistics, card details, and learning dashboard dialogues also
  use larger text and buttons.
- The Help menu now includes project wiki and bug-report items that open the
  Cosimo wiki and Fossil new-ticket page in the default browser.
- The ready-screen top status line now stays short instead of showing full deck
  and database paths, avoiding truncation in narrower windows while the summary
  still shows the review database path.
- The ready-screen summary now preserves its text position during automatic
  refreshes, avoiding cursor jumps while reading the summary text.

### Database Maintenance

- `File -> Reclaim Database Space` now runs SQLite `VACUUM` on the review
  database without deleting dormant data or overwriting the retained
  review-database backup.
- Expired deferrals and inactive card-state rows are now cleaned when opening a
  deck, before starting a review pass, and during scrub or reclaim maintenance,
  so stale state rows do not keep affecting the ready list.

### Error Handling

- Deck, review database, and config write errors now include the affected path
  and brief recovery guidance. Startup failures now state explicitly when no
  deck is open and show both the deck and review database paths involved.
- Report-save, review-recording, review-pass-summary, and review-database
  backup errors now include the affected paths and state whether the requested
  operation was saved, skipped, or left partially recorded.

### Documentation and Packaging

- The user guide and project wiki now document portable installation and
  upgrade: expand the release zip into the folder where Cosimo should run, and
  expand a newer release over the existing folder to upgrade.
- The project wiki now includes Spanish and Galician entry pages, Fossil clone
  guidance, and instructions for anonymous users to file tickets.
- The project wiki now includes a deck page for example and community decks,
  with CC0 attachments for the default example deck and a basic Indonesian
  vocabulary deck.
- Release packages now include `CHANGELOG.md` at the application root and no
  longer include `decks/` or a default deck, so upgrading by extraction does
  not overwrite user deck data.

## 0.1.4 beta 5 - 2026-05-04

### Ready Screen and Deck Navigation

- Cards can now be marked non-reversible. This removes any active generated
  reverse card for the selected parent and prevents future bulk reversal from
  adding it again until reversal is allowed again. Non-reversible cards are now
  marked in the ready list, shown in card details, and available through the
  ready-list filter combo box.
- Card details now show card characteristics such as suspended, flagged,
  reverse, has reverse, and non-reversible on one state line. Generated reverse
  cards now show the parent card ID. Future and overdue scheduled review times
  are shown as a complete relative duration followed by the exact UTC timestamp.
- `File -> Scrub Review Database` can now delete dormant review database rows
  for removed cards and inactive generated reverse cards, with confirmation
  warnings that reflect the review-database backup policy. It also vacuums the
  SQLite database afterward so freed pages can be reclaimed.
- Ready-list selection now tracks the selected card by stable card identity
  across sorting, filtering, editing, and reverse-card changes. Adding a card
  selects the newly added card, and deleting a card selects the next visible
  card in the current list order.
- The View menu now uses checkable menu items for the active ready-list sort
  criterion and direction. The ready list can also sort by prompt text,
  response text, or estimated recall, with lower estimated recall first in
  ascending order.
- Cards can now be flagged with Ctrl+F on the ready list or during review, from
  the Cards menu, from the ready-list context menu, or with review-screen
  buttons after the rating choices. Flagged cards are marked in the ready list
  and can be shown with the flagged card filter without changing scheduling.
- Cards can now be deferred from the Cards menu or ready-list context menu
  until tomorrow, then made available again manually or automatically when the
  deferral expires. Deferred cards are marked in the ready list, can be shown
  with the deferred-card filter, and are excluded from scheduled and forced
  passes while deferred without changing their stored schedule.

### Review Flow

- `File -> Options` now offers a four-value sound notification policy:
  always, when Cosimo is visible, when Cosimo is in the system tray, or never.
  Timed ready-screen refreshes can play distinct sounds when reviews become
  available or when more reviews become available; manual refreshes,
  user-triggered changes, and active review passes remain silent.
- `File -> Options` can enable minimise-to-system-tray behaviour. When enabled,
  the normal window minimise action hides Cosimo in the system tray; activating
  the tray icon restores the window, and the tray context menu offers Restore
  and Quit. The Windows tray restore and quit paths were hardened after manual
  testing with wxWidgets debug checks enabled.
- End-of-pass statistics can now be saved directly from the statistics dialogue
  to a text report under `reports/`, named from the deck file stem and pass
  finish time. Reports include the full deck path and avoid overwriting
  existing reports.
- The statistics dialogue no longer contains an invalid XRC sizer flag that
  could show an `unknown sizer flag "0"` error after a review pass.
- Review databases now store non-reversible card markers and migrate schema
  version 6 databases to schema version 7.
- Review databases now store sparse card state markers for flags and
  suspensions in one table. Schema version 7 databases migrate to schema
  version 8 by moving existing suspension rows into that table.
- Review databases now allow deferred card state rows and migrate schema
  version 8 databases to schema version 9.

## 0.1.3 beta 4 - 2026-05-02

### Ready Screen and Deck Navigation

- The ready-screen summary now shows the due-card count in parentheses when
  the scheduled count includes extra minimum-fill cards.
- `File -> Learning Dashboard` now opens a deck-wide learning summary with
  card-state counts, estimated recall, confidence calibration, and learning
  pace figures. When generated reverse cards exist, it shows standard cards,
  reversed cards, and total cards separately.
- Learning dashboard due counts are now labelled as available now and scheduled
  and overdue to clarify the difference between cards that can be reviewed
  immediately and scheduled cards that are already late.
- Learning dashboard recall estimates now use sub-day elapsed time and the
  actual short learning/relearning interval, preventing recently failed cards
  from appearing as perfectly remembered until a whole day has passed.
- Cards can now be marked reversible from the Cards menu or with Ctrl+R on the
  ready list. Generated reverse cards have separate scheduling and review
  history, are blocked when duplicate responses would make them ambiguous, and
  can be shown with the reverse-card filter.
- `Cards -> Make Possible Cards Reversible` can mark every eligible card
  reversible after confirmation, excluding cards already reversible and cards
  whose responses are duplicated.
- Bulk reversible-card creation now backs up the review database first when
  review database backups are enabled, then writes the generated reverse-card
  flags in one database transaction, avoiding a long apparent freeze on larger
  decks. Its confirmation warns that the retained review-database backup will
  be overwritten.
- `Cards -> Undo Last Bulk Reversal` can remove only the reverse cards created
  by the latest bulk reversal batch, leaving manual reversals and older batches
  active.
- The ready-list filter combo box can now show cards with duplicated prompts or
  duplicated responses.
- Delete confirmations now explain the data consequences for generated reverse
  cards and for parent cards that have generated reverse cards.
- `View -> Last Reviewed` can sort the ready list by most recently reviewed
  first, leaving new cards at the bottom.

### Review Flow

- Scheduled due cards within about one hour of each other are now randomised
  within that near-tie group to reduce thematic clumping while preserving
  broader overdue priority.
- Due learning and relearning cards are now reviewed before ordinary due review
  cards.
- Cards marked `Again` now use a 10-minute learning or relearning interval,
  while still repeating once at the end of the current pass.
- Cards repeated at the end of a pass after an `Again` rating are now
  randomised instead of following the order in which they failed.
- End-of-pass statistics now separate unique cards from total answered
  questions and include total time, time per question, and time per unique
  card.
- Review databases now store pass-level records and link them to the existing
  per-card review events, including initial and final question counts, providing
  a normalised base for later analytics.
- Review database schedules now store the actual interval in seconds alongside
  the existing whole-day interval, preparing learning and relearning cards for
  sub-day scheduling steps.
- Review databases now store reversible-card parent keys in `card_reversals`
  and migrate schema version 4 databases to schema version 5.
- Review databases now store bulk reverse-card batch metadata and migrate
  schema version 5 databases to schema version 6, allowing the latest bulk
  reversal to be undone without removing manual reversals.

### Data Integrity

- Opening a deck now performs higher-level review-database consistency checks
  after SQLite integrity and schema checks, including stored rating/schedule
  values, review-pass links, and active reversible-card ambiguity.

### Code Quality

- `RecallFeedback` variants now use the standard `Again`, `Hard`, `Good`, and
  `Easy` names while keeping the same stored numeric values.
- Localisation labels, plural nouns, and formatted message templates now use
  gettext `.po` catalogues compiled into Rust at build time, preparing the
  project for additional languages without adding a runtime gettext dependency.

### Documentation and Packaging

- A Galician user guide was added, with a generated HTML version.

## 0.1.2 beta 3 - 2026-04-29

### Ready Screen and Deck Navigation

- `Cards -> Add Card Batch` adds a fast repeated-entry dialogue. Ctrl+Enter adds
  from either field, and Tab from the response field adds when both fields
  contain text.
- The main window now has a status bar summarising total cards, cards due now,
  and the next review using speech-friendly rounded durations.
- The ready-list filter and sort mode are now persisted in `cosimo.ini`.
- The ready screen has a single-line text filter, reachable with Alt+L, that
  narrows the prompt list by matching prompt or response text.
- Cards can be suspended from review. Suspended cards are marked in the ready
  list, excluded from scheduled and forced passes, ignored by the status bar
  review timing, and can be toggled from the Cards menu, the ready-list context
  menu, or Ctrl+S while the ready list has focus.
- The ready-list context menu now includes Edit, Remove, and
  Suspend/Unsuspend for the selected card.
- File-menu Quit no longer claims redundant Ctrl-key accelerators, leaving
  Ctrl+S available for ready-list suspension.
- Recent decks now omit the currently open deck, and a single remaining recent
  deck is shown directly in the File menu instead of in a one-item submenu.

## 0.1.1 beta 2 - 2026-04-27

This release summarises changes since the first beta, whose last `0.1.0`
checkout was `f6df45f10b`.

### Review Flow

- Cards rated `Again` are repeated once at the end of the current pass.
- Scheduled overdue cards are reviewed before new cards, ordered by how overdue
  they are. Equal due-time ties and new cards are randomised to avoid deck-order
  cueing.
- The prompt can be revealed directly with Space or the `Reveal Response`
  button. This records the pre-response confidence as `Not answered`.
- The current card can be edited after its response is revealed, using `e` or
  the `Edit Card` button, and review returns to the post-response rating step.
- Focus after editing a revealed card is restored to the previous post-response
  control.
- The statistics dialogue accepts Enter on its summary text and returns focus to
  the prompt list after Continue.

### Ready Screen and Deck Navigation

- `File -> Recent Decks` lists up to eight recently opened decks.
- Unavailable recent-deck slots are hidden instead of shown as disabled
  placeholder menu items.
- The ready screen can filter cards by all, due, new, and not-due views, with
  item counts in the filter choices.
- `View -> Deck Order` and `View -> Next Scheduled Review` control ready-list
  sorting.
- Pressing Alt+Enter on a selected ready-list card opens a details dialogue showing
  prompt, response, ID, review count, last review, scheduling state, next
  scheduled review, and review history.
- The ready card list has a user-facing accessibility name, and the Cards menu
  edit item changes to Edit Current Card after a review card is revealed.
- Reopening or continuing to the ready screen preserves useful ready-list
  selection and focus behaviour.

### Backups, Settings, and Data Integrity

- Portable settings now live in `cosimo.ini`. Older
  `cosimo-settings.txt` and `cosimo-last-open-deck.txt` files are migrated and
  removed automatically.
- Automatic deck backups are stored in one app-level `backups` directory with
  an `index.txt` that records the original deck path for each backup.
- Deck backup policy is configurable as full history, last-only, or none.
- `File -> Options -> Delete Old Backups` can prune obsolete deck backups after
  confirmation while refusing to overwrite unindexed files.
- Review database backups can be enabled or disabled. When enabled, Cosimo
  refreshes one retained review-database backup when a review pass starts.
- Review databases are checked with SQLite `quick_check` when opened.
- Review database schema versions are validated, and the existing
  `prompt_guess` constraint is migrated to support direct reveal.
- Backup, migration, and database-integrity failures now block risky deck
  writes or are surfaced in status text instead of silently proceeding.
- Durable file replacement now syncs temporary files and best-effort syncs
  containing directories; Windows replacements use write-through semantics.

### Accessibility and Localisation

- Spanish localisation was revised for accents, project terminology, menus,
  and keyboard mnemonics.
- Runtime language selection defaults to English for unknown locales and uses
  Spanish when the system locale is Spanish.
- Menu items and top-level menu names are localised at runtime.
- Shortcut clashes in Spanish were corrected.
- The delete-card button no longer exposes a misleading shortcut
  announcement.
- The Windows build uses the GUI subsystem, so the packaged executable should
  not open a console window.
- `Help -> About` shows authorship, support contact, version, and beta status.
- `Help -> User Guide` opens the generated HTML user guide.

### Documentation and Packaging

- The project uses GPLv3.
- Cargo package metadata and include rules were added for crate publishing.
- The default package excludes old probe examples and helper scripts.
- User guides now exist in English and Spanish, with generated HTML versions.
- Troubleshooting guides now exist in English and Spanish.
- Backup, restore, accessibility acceptance, rating storage, deck format, and
  release packaging guidance were expanded.
- Documentation links were converted to relative links.

### Tests and Internal Quality

- Regression coverage was expanded around localisation, keyboard behaviour,
  ready-list focus, statistics Continue, backups, migration failure, corrupt
  databases, filtering, sorting, card details, direct reveal, and revealed-card
  editing.
- Application configuration, file/backup operations, ready-list logic, review
  session state, options dialogue, review dialogues, and generic dialogue helpers
  were split out of `src/main.rs`.
- Review-session state now uses typed ready/running states and queue invariants.
- `cargo clippy --all-targets` is clean as of the beta-2 preparation pass.

### Known Issue

- Some screen reader and wxWidgets combinations announce the selected ready-list
  item twice when tabbing into the prompt list. Arrow-key navigation, selection,
  editing, removal, details, and review startup remain functional.

## 0.1.0 beta 1

- First beta release.
