Skip to content

Give immediate feedback on large repos - #163

Merged
fregante merged 7 commits into
mainfrom
copilot/fix-no-feedback-for-large-repos
May 13, 2026
Merged

fregante merged 7 commits into
mainfrom
copilot/fix-no-feedback-for-large-repos

Conversation

Copilot AI commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Large repository directory URLs could appear stalled for several seconds because no status was rendered until the first API response returned. This change surfaces parsed repository/directory information immediately, so users get instant feedback before network-bound listing begins.

  • Early, synchronous URL preview in UI flow

    • Added a lightweight preflight parse step in init() to render repo/directory status before getRepositoryInfo() and directory-list API calls.
    • Status now clearly indicates this is parsed URL feedback.
  • Extracted reusable preview parser

    • Added getRepositoryPreview(url) in repository-info.ts to synchronously parse:
      • user
      • repository
      • directory path (decoded)
      • existing structural errors (NOT_A_REPOSITORY, NOT_A_DIRECTORY)
    • Kept existing async repository resolution/download behavior unchanged.
  • Focused parser coverage

    • Added targeted tests for getRepositoryPreview covering invalid repo URL, non-directory URL shape, and encoded directory segments.
const repositoryPreview = getRepositoryPreview(url);
if (!('error' in repositoryPreview)) {
	updateStatus(
		`Parsed URL — Repo: ${repositoryPreview.user}/${repositoryPreview.repository}\nDirectory: /${repositoryPreview.directory}`,
	);
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-edgeupdater --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl (dns block)
  • https://api.github.com/repos/refined-github/sandbox
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --conditions development --conditions node /home/REDACTED/work/download-directory.github.io/download-directory.github.io/node_modules/tinypool/dist/entry/process.js (http block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --conditions development --conditions node /home/REDACTED/work/download-directory.github.io/download-directory.github.io/node_modules/tinypool/dist/entry/process.js --local tnet/tools/sh credential.helpegit (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@netlify

netlify Bot commented May 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for preview-for-download-directory-github-io ready!

Name Link
🔨 Latest commit 7a55501
🔍 Latest deploy log https://app.netlify.com/projects/preview-for-download-directory-github-io/deploys/6a04432c509268000873858b
😎 Deploy Preview https://deploy-preview-163--preview-for-download-directory-github-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix delayed feedback for large repository requests Show immediate parsed-path feedback before large repository API calls May 13, 2026
Copilot AI requested a review from fregante May 13, 2026 08:28
@fregante
fregante marked this pull request as ready for review May 13, 2026 08:47
Comment thread index.ts Resolved
Comment thread index.ts Resolved
Comment thread index.ts Resolved

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell /home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1223/chrome-headless-shell-linux64/chrome-headless-shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-edgeupdater --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl (dns block)
  • https://api.github.com/repos/refined-github/sandbox
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --conditions development --conditions node /home/REDACTED/work/download-directory.github.io/download-directory.github.io/node_modules/tinypool/dist/entry/process.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from fregante May 13, 2026 09:02
@fregante fregante changed the title Show immediate parsed-path feedback before large repository API calls Give immediate feedback on large repos May 13, 2026
@fregante

Copy link
Copy Markdown
Member

Before

Notice how long it takes for any text to appear after the [Enter]

Screen.Recording.2.mov

After

"Repo" appears immediately, showing something is happening

Screen.Recording.5.mov

@fregante
fregante merged commit eee8870 into main May 13, 2026
6 checks passed
@fregante
fregante deleted the copilot/fix-no-feedback-for-large-repos branch May 13, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

No feedback for several seconds on large repos

2 participants