Skip to content

Stop two errors the app logs on its own - #1950

Merged
abue-ammar merged 1 commit into
mainfrom
fix/launch-log-errors
Nov 18, 2026
Merged

abue-ammar merged 1 commit into
mainfrom
fix/launch-log-errors

Conversation

@abue-ammar

Copy link
Copy Markdown
Owner

Related issue

None. Found while watching the Debug build's log for one minute after launch.

What changed

Two errors that Tinycast's own code wrote to the system log:

  • Quicklinks: duplicate column name: is_enabled on every launch. QuicklinkStore.openDatabase() ran ALTER TABLE quicklinks ADD COLUMN is_enabled … every time. The column has been in the schema since 2026-08-30, so the statement always failed and SQLite logged it. The ALTER is removed. QuicklinkTests.readsADatabaseWrittenElsewhere now writes a table that has the column; it still checks that the columns line up when the table stores them in a different order.
  • Clipboard: Clipboard text extraction failed for a deleted file. A file copied in Finder is stored as a path and read later for text search. If the file is deleted before that, ClipboardTextExtractor.extract threw, and the item failed and was logged 3 times. Now CocoaError.fileReadNoSuchFile returns empty text, so the item counts as a completed attempt, the same as an unsupported file. Other errors, such as a file that exists but cannot be read, still throw and are retried: permission may be given later.
  • Docs: quicklinks.md (storage) and clipboard.md (what counts as a completed attempt).

Memory footprint

Not measured. The change removes one SQLite statement and adds one catch branch.

Step Memory
Idle after launch not measured
Palette open not measured
Feature in use (peak) not measured
Palette closed, settled not measured

Leak-tested: no.

Drawbacks

  • A table created before 2026-08-30 that was never opened by a later build has no is_enabled column. That store will not open, and Quicklinks reports that storage is unavailable.
  • A file that is missing only for a while (for example, on a disconnected drive) is marked done with no text. Before, it gave up after 3 tries anyway. Turning text search off and on again retries it.

AI usage

Claude Code read the log, found the causes, wrote the code, tests and docs, and ran the checks.

Tests & validation

  • On main at 6f479455: Debug build after deleting build/DerivedData, no warnings. ./Scripts/lint.sh clean (the 3 optional_data_string_conversion warnings it prints are already on main). All 113 harnesses pass.
  • New checks in ClipboardTextTests: a deleted file returns empty text, and a file in a folder with no read permission still throws.
  • Ran the Debug build and watched errors and faults at launch: the SQLite error is gone.
  • Not tested by hand: deleting a copied file and watching text search skip it.

Quicklinks: remove the is_enabled ALTER TABLE that ran on every launch.
The column has been in the schema since 2026-08-30, so SQLite logged
"duplicate column name" each time.

Clipboard text search: a copied file that was deleted now completes with
empty text instead of failing three times and logging each failure. A
file that exists but cannot be read still fails and is retried.
@abue-ammar
abue-ammar merged commit fe94d6f into main Nov 18, 2026
2 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.

1 participant