Initial optimisation - #223
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Backend: api_client, bookmarks, s3_drive, tasks services now use safe_insert/safe_update_one/safe_delete_one helpers. -139 LOC. Web: useCopyToClipboard extended with silent/resetMs options + stable useCallback. Migrated 16 tool components from raw clipboard try/catch pattern to the shared hook. -216 net LOC, 29 files. Web typecheck clean. Backend 54/55 (pre-existing cache_config env-leak unrelated). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…lsites
Hook: add errorMessage option for translated error toasts.
Migrated 20 components from raw clipboard try/catch to useCopyToClipboard:
- Toast-flow (10): bookmark-card, api-client/code-generator,
api-client/response-panel, csv-excel-json, json-formatter,
json-schema-generator, nosql-explorer/{connection-form,document-view,
explorer-sidebar}, snippet-manager-tool, s3-drive/file-browser
- Silent-fail (10): dns-lookup, docker-compose, encryption-playground,
markdown-preview-html, password-manager/advanced-generator,
ssh-key-generator, totp-generator, uuid-generator (IdRow),
to-do/{KanbanCard,TaskItem}
-56 net LOC, 22 files. Typecheck clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Hook gains reset() method and tracks pending timeout via ref, so successive copies cancel stale resets (fixes flicker bug url-parser worked around with its own timerRef). Migrated 9 more components (regen-flow + ref-based): - Regen-flow (uses resetCopied on regenerate): sql-formatter, yaml-formatter, graphql-formatter, mock-data-generator, lorem-ipsum, secret-api-key-generator, uuid-generator (main) - Ref-based: url-parser (drops own timerRef), public-profile-client (drops own copyTimerRef + cleanup useEffect) -29 net LOC, 10 files. Typecheck clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
file-browser.tsx 1928 → 1314 LOC. Extracted sub-components and helpers: - file-types.ts: extension constants, getFileType, isPreviewable, TYPE_* maps - file-icon.tsx: FileIconComp - checkbox.tsx: Checkbox, isCheckboxClick - file-preview-dialog.tsx: FilePreviewDialog + PreviewState type - rename-dialog.tsx: RenameDialog - share-link-dialog.tsx: ShareLinkDialog - upload-progress-panel.tsx: UploadProgressPanel + FileUploadStatus type - move-to-dialog.tsx: MoveToDialog - utils.ts: + moveFolderRecursive, uploadFileXHR No behavior change. Each extracted component is self-contained. Typecheck clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
No description provided.