Skip to content

Introducing stop request/runner - #154

Merged
matstech merged 5 commits into
mainfrom
146-stop-request-before-timeout
May 17, 2026
Merged

matstech merged 5 commits into
mainfrom
146-stop-request-before-timeout

Conversation

@matstech

@matstech matstech commented May 13, 2026 •

Copy link
Copy Markdown
Member

Summary 💡

This PR covers two different improvements (I thought they were dependent on each other):

Description 📝

  • requester.Service now accepts context.Context throughout the execution pipeline, enabling mid-flight cancellation.
  • App.CancelExecute(requestId) cancels a single ongoing request; App.CancelRunner() cancels a parallel run.
  • Fixed runner.go dispatcher: return replaced with break loop so wg.Wait() / close(resultChan) are always reached after cancellation.
  • Introduced runnerStore.svelte.ts; RequestRunner.svelte refactored to a thin UI layer. Stop buttons added to both the request builder and the runner.

Tests performed 🧪

  • Go test suite passes: go test ./....
  • Frontend: format, check, lint, build all pass.

Breaking Changes 💔

None

@matstech matstech linked an issue May 13, 2026 that may be closed by this pull request
@matstech
matstech marked this pull request as ready for review May 13, 2026 19:56
@matstech
matstech requested a review from speziato May 13, 2026 19:57
@matstech matstech changed the title 146 stop request before timeout Introducing stop request/runner May 13, 2026

@speziato speziato left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks great! I left some comments with some proposed changes.

I will also leave only a comment here: I don't like very much that the prettify function is in http.ts, maybe it could be placed in utils.ts instead, but it's not really important.

@matstech
matstech requested a review from speziato May 16, 2026 05:27
@matstech
matstech force-pushed the 146-stop-request-before-timeout branch from 5e00a00 to 7106f8c Compare May 16, 2026 12:59

@speziato speziato left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a non-blocking suggestion. This PR highlights that tabStore.svelte.ts is in desperate need of a serious refactor to keep it more "DRY", but we can do that later.

Comment on lines +101 to +102
concurrency: 1,
iterations: 1,

@speziato speziato May 16, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep the same defaults we were using before? like:

Suggested change
concurrency: 1,
iterations: 1,
concurrency: 5,
iterations: 20,

maybe using two constants, since this snippet is repeated 3 times

@matstech
matstech merged commit 7c1ec95 into main May 17, 2026
7 checks passed
@matstech
matstech deleted the 146-stop-request-before-timeout branch May 17, 2026 05:24
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.

Stop request before timeout

2 participants