Repository navigation
docs(architecture): describe the whole command surface, not two thirds of it - #606
Merged
Merged
Conversation
…s of it Section 5 declared the Tauri commands but omitted 32 of the 63 registered, so a reader could not tell whether a command existed by looking. #582 fixed the other direction — commands documented but never written — and this is the half that was left (#457). Added: the two connection commands, kill_query and get_own_thread_ids, the four view and DDL commands, the four AI commands that exist, and three sections that had no place to live at all — history (§5.6), SQLite (§5.7) and platform (§5.8). Each says why the command is shaped as it is rather than restating its signature, since the signature is generated into bindings.ts and does not need a second copy. The check script only matched `async fn`, so a documented *sync* command was invisible to it. Widening the pattern immediately found `format_sql` — documented, never implemented, and undetectable by the tool written to catch exactly that. It is now marked NOT IMPLEMENTED and not planned: formatting is the frontend's, via the sql-formatter npm package, and a round trip to Rust to reformat text as the user types would buy nothing. Widening it also broke the name extraction, because a one-line signature ends in its return type rather than the function name. Fixed, and verified the check still fails on a reintroduced break before trusting the pass. Closes #457 Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Closes #457.
§5 declared the Tauri commands but omitted 32 of the 63 registered, so a reader couldn't tell whether a command existed by looking. #582 fixed the other direction — commands documented but never written — and this is the half that was left.
Added: the two connection commands,
kill_queryandget_own_thread_ids, the four view/DDL commands, the four AI commands that exist, and three sections that had nowhere to live at all — history (§5.6), SQLite (§5.7), platform (§5.8).Each entry says why the command is shaped as it is rather than restating the signature — the signature is generated into
bindings.tsand doesn't need a second copy that can drift.The check script couldn't see its own blind spot
check-documented-commands.shonly matchedasync fn, so a documented sync command was invisible to it. Widening the pattern immediately turned upformat_sql: documented, never implemented, and undetectable by the tool written to catch exactly that.It's now marked NOT IMPLEMENTED and not planned — formatting belongs to the frontend via
sql-formatter, and a round trip to Rust to reformat text as the user types would buy nothing.Widening the pattern also broke name extraction, because a one-line signature ends in its return type rather than the function name. Fixed, and verified the check still fails on a reintroduced break (a renamed sync command) before trusting the pass.
Verification
check-documented-commands.shpasses with 0 undocumented and 11 explicitly marked as planned. dprint clean.