Skip to content

Remove dead live-preview path from tinyskills - #245

Open
Hotragn wants to merge 1 commit into
tinyfish-io:mainfrom
Hotragn:hotragn/fix-tinyskills-dead-streaming
Open

Remove dead live-preview path from tinyskills#245
Hotragn wants to merge 1 commit into
tinyfish-io:mainfrom
Hotragn:hotragn/fix-tinyskills-dead-streaming

Conversation

@Hotragn

@Hotragn Hotragn commented Aug 4, 2026

Copy link
Copy Markdown

Refs #86. Found by the conformance check in #244.

The bug

hooks/use-generation.ts had a branch for a source_streaming event that nothing sends:

emitted by app/api/scrape-sources/route.ts:
  source_start, source_step, source_error, source_complete,
  scrape_complete, error, scrape_start

consumed by hooks/use-generation.ts:
  source_start, source_step, source_streaming, source_complete,
  source_error, scrape_complete, error
                ^^^^^^^^^^^^^^^^ never emitted

grep -rn source_streaming tinyskills/ returns exactly one line — the consumer. So the branch never ran, ScrapeProgress.streamingUrl was never assigned, and both UI blocks gated on it were unreachable:

  • app/page.tsx:366 — external-link icon on a scraping row
  • components/skillforge/source-progress.tsx:105 — the "Watch live" tooltip link

Why removing it is the right fix, not emitting it

This is left over from before the recipe moved to TinyFish Fetch. The route now calls client.fetch.getContents({ urls, format: "markdown" }) — a batch request/response with no browser session, so there is no streaming URL to surface. grep -rn "agent\.\|\.stream(" tinyskills/ finds nothing; the recipe never touches the Agent endpoint.

Making the "Watch live" link work again would mean moving this recipe back to the Agent endpoint, which is metered where Fetch is free. That's a product decision about the recipe's cost profile, not a bug fix, so it isn't mine to make in this PR. Removing the vestigial path leaves the recipe honest about what it actually does.

Changes

  • types/index.ts — drop ScrapeProgress.streamingUrl
  • app/api/scrape-sources/route.ts — drop the field copy into finalResults
  • hooks/use-generation.ts — drop the source_streaming branch
  • app/page.tsx, components/skillforge/source-progress.tsx — drop the two unreachable links
  • drop imports orphaned by the above (ExternalLink, and Tooltip* in source-progress.tsx)

Net −47/+1. No behaviour change: every removed path was already unreachable. components/ui/tooltip.tsx is left in place as an unused shadcn primitive.

Verification

cd tinyskills && npm ci
npx tsc --noEmit        # clean
npx eslint . --ext .ts,.tsx   # clean

Note npm run lint fails on its own — the script is next lint, which Next removed after 14. Unrelated to this change, but worth knowing if you try it.

use-generation.ts handled a "source_streaming" event that no producer
emits. The scrape route sends source_start, source_step, source_error,
source_complete, scrape_complete, error and scrape_start -- never
source_streaming -- so the branch never ran and ScrapeProgress.streamingUrl
was never assigned. Both UI blocks gated on it were therefore unreachable.

This is left over from before the recipe moved to TinyFish Fetch. The
route now calls client.fetch.getContents(), a batch request with no
browser session, so there is no streaming URL to surface. Wiring one up
would mean switching back to the metered Agent endpoint, which is a
product decision rather than a bug fix, so this removes the vestigial
path instead:

- ScrapeProgress.streamingUrl and the field copy in the route
- the source_streaming branch in useGeneration
- the two "Watch live" links that could never render
- imports orphaned by those removals

Verified with tsc --noEmit and eslint, both clean. Found by the check in
 tinyfish-io#244; refs tinyfish-io#86.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b1c9d1d0-99ab-43a0-8846-c2f54805daf9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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