Skip to content

Initial optimisation - #223

Merged
itsmeakhil merged 5 commits into
mainfrom
optimise-code-base-with-ponytail
Jun 24, 2026
Merged

Initial optimisation#223
itsmeakhil merged 5 commits into
mainfrom
optimise-code-base-with-ponytail

Conversation

@itsmeakhil

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mydevtools-tech Ready Ready Preview, Comment Jun 24, 2026 7:47pm

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>
@itsmeakhil
itsmeakhil merged commit 2afe2e6 into main Jun 24, 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