Repository navigation
chore: share result helpers and save_path copy, drop unused exports - #105
Merged
Merged
Conversation
…d extension checks, and drop unused exports
This was referenced Oct 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cleanup pass over
src/with no behavior change: shared helpers replace copies made across recent PRs, and internal symbols nothing uses are no longer exported.Changes
New
src/results.ts:Json,parseResult(result)anderrorMessage(error)(an error's message, capped at 2000 characters).wait.tsandnotifications.ts, theJsonalias incell.ts, and the same message expression written inline nine times inclient.tsandcell.ts.client.tsandcell.tsalso useparseResultwhere they parsed a result's text by hand.save_path rules (feat: save a screen or window capture as a full-resolution PNG, optionally one region #81 captures and feat: save the clipboard image's original bytes with desktop_clipboard_read save_path #96 clipboard images), in
capture-file.ts:place()helper.extensionOf()helper.validateSave.Poll loops:
wait.ts'spoll()is already the only one;desktop_wait,expectand notifications all go through it or through single reads. Nothing to merge.Dead code: removed the unused
TableErrorimport incell.ts.tsc --noUnusedLocals --noUnusedParametersis now clean.Unused exports:
exportis removed from internal symbols used only in their own module:app.sign;availability'sWindowAvailability,WindowFactsandSessionFacts;capture-file'sCaptureSave,SavedCaptureandSavedClipboardImage;cell.CellIO;notifications'NOTIFICATION_CENTERandNotificationEntry;table'sTABLE_ROLES,TableRowandTable;wait'svalidateWaitandExpectedAction.The public entry points (
client,protocol,tools) are untouched.Error messages, limits and argument checks are unchanged. I left the inline per-argument checks in
client.tsas they are, because merging them would change their error text.Checks
npm run -s check,npm test: 55 pass, including the newtest/results.test.mjstsc --noEmit --noUnusedLocals: clean