Commit Graph

1707 Commits

Author SHA1 Message Date
sua yoo
7df3cb718d
feat: Duplicate workflows with seed file (#2744)
Resolves https://github.com/webrecorder/browsertrix/issues/2732

## Changes

Allows users to duplicate workflows with a seed file.
2025-07-22 21:20:12 -07:00
Ilya Kreymer
795a1a6f58
feat: Frontend upload seed url list (#2761)
Resolves #2646
Depends on #2710

## Changes

(Copied from #2689)

- Allows users to specify URL list as file.
- Allow uploading a text file of URLs
- Allow specifying >100 URLs into URL list, where they will turn into an uploaded list automatically.


---------
Co-authored-by: sua yoo <sua@suayoo.com>
2025-07-22 20:17:27 -07:00
Tessa Walsh
f7ba712646 Add seed file support to Browsertrix backend (#2710)
Fixes #2673 

Changes in this PR:

- Adds a new `file_uploads.py` module and corresponding `/files` API
prefix with methods/endpoints for uploading, GETing, and deleting seed
files (can be extended to other types of files moving forward)
- Seed files are supported via `CrawlConfig.config.seedFileId` on POST
and PATCH endpoints. This seedFileId is replaced by a presigned url when
passed to the crawler by the operator
- Seed files are read when first uploaded to calculate `firstSeed` and
`seedCount` and store them in the database, and this is copied into the
workflow and crawl documents when they are created.
- Logic is added to store `firstSeed` and `seedCount` for other
workflows as well, and a migration added to backfill data, to maintain
consistency and fix some of the pymongo aggregations that previously
assumed all workflows would have at least one `Seed` object in
`CrawlConfig.seeds`
- Seed file and thumbnail storage stats are added to org stats
- Seed file and thumbnail uploads first check that the org's storage
quota has not been exceeded and return a 400 if so
- A cron background job (run weekly each Sunday at midnight by default,
but configurable) is added to look for seed files at least x minutes old
(1440 minutes, or 1 day, by default, but configurable) that are not in
use in any workflows, and to delete them when they are found. The
backend pods will ensure this k8s batch job exists when starting up and
create it if it does not already exist. A database entry for each run of
the job is created in the operator on job completion so that it'll
appear in the `/jobs` API endpoints, but retrying of this type of
regularly scheduled background job is not supported as we don't want to
accidentally create multiple competing scheduled jobs.
- Adds a `min_seed_file_crawler_image` value to the Helm chart that is
checked before creating a crawl from a workflow if set. If a workflow
cannot be run, return the detail of the exception in
`CrawlConfigAddedResponse.errorDetail` so that we can display the reason
in the frontend
- Add SeedFile model from base UserFile (former ImageFIle), ensure all APIs
returning uploaded files return an absolute pre-signed URL (either with external origin or internal service origin)

---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-07-22 19:11:02 -07:00
Ilya Kreymer
8107b054f6
Profiles: Make browser commit API call idempotent (#2728)
- Fix race condition related to browser commit time
- The profile commit request waits for browser to actual finish, and
profile saved. This can cause request to time out, resulting in a retry,
in which the browser has already been closed.
- With these changes, the commit is now 'idempotent' and returns a
waiting_for_browser until the profile is actually committed.
- On frontend, keep pinging commit endpoint with a timeout while 'waiting_for_browser' is returned, actual committed when endpoint returns profile id.

---------

Co-authored-by: sua yoo <sua@suayoo.com>
2025-07-22 17:59:49 -07:00
sua yoo
3043b67e49
feat: Review crawl without analysis run (#2719)
Resolves #2718

## Changes

- Enables manual QA review for successfully finished crawls.
- Individual pages and full crawl can be reviewed without assistive QA running
- Show replay, screenshot and text without comparison if no assistive QA yet.
2025-07-22 16:39:27 -07:00
Emma Segal-Grossman
fc39e1baa7
fix incorrect height of compact current page indicator (#2758) 2025-07-22 18:12:34 -04:00
sua yoo
361612251b
l18n: Manually fix translation files (#2759)
- Fixes French XLIFF file issues preventing `yarn localize:build` from
succeeded
- Fixes extraction errors preventing `yarn localize:extract` from
succeeded
2025-07-22 14:19:28 -07:00
Ilya Kreymer
d41f60d740
Translations update from Hosted Weblate (#2679) (#2750)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for

[Browsertrix/Browsertrix](https://hosted.weblate.org/projects/browsertrix/browsertrix/).



Current translation status:

![Weblate translation

status](https://hosted.weblate.org/widget/browsertrix/browsertrix/horizontal-auto.svg)

---------

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Bricaud Frédéric <frederic.bricaud@banq.qc.ca>
2025-07-18 18:29:34 -07:00
Ilya Kreymer
2f9a61f6be
custom prefix additional fixes (#2746)
- follow-up to: #2736: remove '^' custom prefix URLs to avoid accumulating '^' via utility function
- Show URL prefix list in settings for custom prefix scope.
- Update user guide with correct custom prefix field.

---------

Co-authored-by: sua yoo <sua@webrecorder.org>
2025-07-18 18:21:32 -07:00
Emma Segal-Grossman
74aec5dfa3
Fix pagination buttons having no horizontal padding (#2743) 2025-07-16 21:23:07 -04:00
Ilya Kreymer
3af94ca03d
Ensure replay.json returns correct origin for pagesQueryUrl (#2741)
- Use the Host + X-Forwarded-Proto header from API request
- Fixes #2740, better fix for #2720 avoiding need for separate alias
2025-07-16 10:48:24 -07:00
Ilya Kreymer
0402f14b5e version: bump to 1.17.4 2025-07-16 10:22:10 -07:00
Emma Segal-Grossman
945c458011
Use curly quote for default archive name instead of straight quote (#2700)
Tiny little thing that's been bugging me for a little while now.
2025-07-16 11:41:19 -04:00
Tessa Walsh
d91a3bc088
Run webhook tests nightly (#2738)
Fixes #2737 

- Moves webhook-related tests to run nightly, to speed up CI runs and
avoid the periodic failures we've been getting lately.
- Also ensures all try/except blocks that have time.sleep in the 'try' also have a time.sleep in 'except'
to avoid fast-looping retries

---------

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-07-15 18:05:57 -07:00
Ilya Kreymer
4e0e9c87c2
qa: run siteSpecific behaviors on QA (#2739)
- allow the page loading waiting time to be applied for sites with
site-specific behaviors (eg. social media)
2025-07-15 16:17:55 -07:00
Ilya Kreymer
5d2b34f3b6
Custom Page Prefix Usability Fixes (#2736)
- Automatically compute prefix from starting URL, if no other prefix is
set in custom prefix mode.
- Ensure each prefix is actually a prefix: add '^' to each custom prefix
URL, as include URL path is a regex
- rename 'Extra URL Prefixes' to just 'URL Prefixes' and adjust help
text to indicate that the prefix list is the list that is in scope
- fixes #2735, follow up to #2722

---------

Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
Co-authored-by: sua yoo <sua@webrecorder.org>
2025-07-15 13:19:20 -07:00
Emma Segal-Grossman
b0f2d87ce2
hotfix: workflow list - rewrite arrays in url search params to remove items (#2734)
## Changes

- Deletes and rewrites arrays in URL search params in workflow list when
editing array filters (i.e. tags & profiles)
- Removes a missed `console.log`
- bump to 1.17.3

cc @SuaYoo

---------

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-07-14 14:30:18 -07:00
Emma Segal-Grossman
b3c8cc5994
Add browser profile filter to workflow list & add link to filtered list to profile detail pages (#2727) 2025-07-14 12:39:22 -04:00
Emma Segal-Grossman
f91bfda42e
Allow searching by multiple tags & profiles with "and"/"or" options for tags (#2717)
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-07-11 22:35:52 -04:00
Ilya Kreymer
6f1ced0b01
chart: default to latest replayweb.page release by default (#2724)
Avoid having Browsertrix be stuck on old RWP releases, probably better
to just use latest as RWP releases now have additional testing.
2025-07-10 13:35:20 -07:00
Ilya Kreymer
23700cba2d
concurrent crawls: revert change in #2701, previous logic was already correct (#2726)
- change was unneeded (and made it worse), just add more comments
2025-07-10 13:34:56 -07:00
Emma Segal-Grossman
f36fc91963
Format page numbers in pagination component (#2723)
Closes #2704
2025-07-09 18:32:35 -07:00
Tessa Walsh
a4b30c056d
Fix custom page prefix scope (#2722)
Fixes #2721 

This PR removes frontend logic that set the seed-level scopeType for
custom page prefix workflows to `prefix`, which was causing the scope to
balloon larger than what users intended for some workflows.
2025-07-09 17:42:09 -07:00
Ilya Kreymer
841c45fe59
volumes: use emptyDir for tmp dir volume (#2713)
- don't use a persistent volume for /tmp, instead use a temporary
emptyDir
- use volume to avoid permission issues with default /tmp dir
- follow-up to #2623
2025-07-08 13:10:02 -07:00
Emma Segal-Grossman
74c72ce551
Include tag counts in tag filter & tag input autocomplete (#2711) 2025-07-08 15:20:41 -04:00
Pierre
80a225c677
docs(deployment): add note about potential firewall issues on RHEL (#2707)
Add a warning box to the troubleshooting
advice (https://docs.browsertrix.com/deploy/local/#debugging-pod-issues)
in the local deployment guide about firewall rules and disabling firewalld on RHEL.

See https://forum.webrecorder.net/t/browsertrix-deployment-stalls-when-initializing-container-migrations/916/5 for context.
2025-07-07 17:16:12 -07:00
sua yoo
7a6b1d7e73
feat: Filter workflows by tag + update existing filter UI (#2702)
Resolves https://github.com/webrecorder/browsertrix/issues/2660

## Changes

- Enables filtering workflow list by tag
- Displays tags near workflow name in detail view
- Adds `<btrix-filter-chip>` component
  - Migrates "schedule state", "only running", and "only mine" filters
  - Adds basic documentation to Storybook

---------
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2025-07-07 17:11:10 -07:00
sua yoo
9cfed7c6fc
fix: Superadmin active crawl count inaccuracies (#2706)
- Fixes superadmin active crawl count not showing on first log in
- Fixes `/all/crawls` endpoint running when auth is not available or not
superadmin
2025-07-07 10:13:57 -07:00
Ilya Kreymer
8152223750
concurrent crawls: filter concurrent crawls check (#2701)
ensure concurrent crawls check only counts running or waiting crawls only, not all existing crawljobs
2025-07-03 09:57:07 -07:00
Tessa Walsh
5b4fee73e6
Remove workflows from GET profile endpoint + add inUse flag instead (#2703)
Connected to #2661 

- Removes crawl workflows from being returned as part of the profile
response.
- Frontend: removes display of workflows in profile details.
- Adds 'inUse' flag to all profile responses to indicate profile is in
use by at least one workflow
- Adds 'profileid' as possible filter for workflows search in
preparation for filtering by profile id (#2708)
- Make 'profile_in_use' a proper error (returning 400) on profile
delete.

---------

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-07-02 16:44:12 -07:00
Ilya Kreymer
b915e734d1 version: bump to 1.17.2 2025-06-30 14:20:43 -07:00
sua yoo
969ea71dd3
devex: Update status indicator Storybook docs (#2668)
Updates docs for status indicator intended implementation:
- Renames "Neutral" -> "Incomplete"
- Adds "Info"
- Adds "Fatal"
2025-06-30 12:29:45 -07:00
Emma Segal-Grossman
1cfdb97d57
Allow filtering workflows to only running, & add dashboard links (#2607)
Co-authored-by: sua yoo <sua@suayoo.com>
Co-authored-by: sua yoo <sua@webrecorder.org>
2025-06-30 15:19:05 -04:00
Emma Segal-Grossman
52da39c2b4
Add auto-link & various other url helpers (#2687) 2025-06-30 14:00:46 -04:00
sua yoo
0a68485c07
fix: Show latest crawl logs for failed workflows (#2694)
Shows "Logs" tab for failed workflows, and links directly to logs when
clicking a failed workflow in the workflow list.
2025-06-30 10:12:06 -07:00
sua yoo
5c78a57cbb
fix: Hide irrelevant tabs in failed crawl detail view (#2695)
Hides QA, replay, and files tabs for failed ("failed", "canceled", and
skipped) crawls.
2025-06-30 10:07:37 -07:00
sua yoo
ff10dd02d4
fix: Refresh workflow crawls list when workflow status changes (#2691)
- Refreshes crawls list on workflow status change to fix stale crawls
being displayed
- Adds "Started" and "Finished" prefix to "Last Run" value
2025-06-26 13:36:50 -07:00
sua yoo
f389b9b90b
fix: Close "please log in" alert when accepting invite (#2688)
No issue created, quick fix for edge case

## Changes

Adds ID to accept page toast messages so that "Please log in ..."
message closes once the invite is accepted or declined.

## Manual testing

1. Log in as org admin
2. Invite user (one you have access to) to an org
3. Log out and log in as invited user
4. Click invite link in inbox
5. Click accept quickly. Verify "Please log in ..." message is replaced
with "You've joined ..."
2025-06-26 10:49:28 -04:00
sua yoo
f9aa5a8f38
devex: Create and document file selection components (#2654)
- Adds new `<btrix-file-input>` component
- Refactors file upload to use `btrix-file-input`
2025-06-23 15:38:46 -07:00
Emma Segal-Grossman
53a3521917
Bug: load correct workflow page on initial render (#2677) 2025-06-23 18:37:18 -04:00
Tessa Walsh
db4621602e
Bump version to 1.17.1 (#2678) 2025-06-18 13:09:49 -04:00
Emma Segal-Grossman
30e1224e8b
Add hardcoded exceptions to preventing enter keypresses in workflow form (#2674)
Fixes https://github.com/webrecorder/browsertrix/issues/2675
2025-06-18 13:05:02 -04:00
Ilya Kreymer
dde23426b2 version: bump to 1.17.0! 2025-06-12 17:37:07 -04:00
sua yoo
9a65102274
Make trial banner informational at start of trial (#2667)
## Changes

Following
bbd5fb81c4,
since the banner is shown throughout the duration of the trial, it should be
made informational at the beginning of the trial so that it's not as obtrusive.
2025-06-12 16:07:20 -04:00
Tessa Walsh
67bf949802
Set fields in AIOConfig to prevent MissingContentLength error on upload (#2665)
Needed to support upload with certain S3 providers.
Fixes #2664
2025-06-12 15:27:38 -04:00
Ilya Kreymer
d4a2a66d6d
additional scale / browser window cleanup to properly support QA: (#2663)
- follow up to #2627 
- use qa_num_browser_windows to set exact number of QA browsers,
fallback to qa_scale
- set num_browser_windows and num_browsers_per_pod using crawler / qa
values depending if QA crawl
- scale_from_browser_windows() accepts optional browsers_per_pod if
dealing with possible QA override
- store 'desiredScale' in CrawlStatus to avoid recomputing for later
scale resolving
- ensure status.scale is always the actual scale observed
2025-06-12 13:09:04 -04:00
Ilya Kreymer
001277ac9d
docs: add docs for path / virtual addressing (#2669)
Add docs about path / virtual 'access_addressing_style' that is
available for each storage option.

---------

Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2025-06-12 13:08:27 -04:00
Ilya Kreymer
8516d70486
Weblate -> Main Merge (#2670)
Merge changes from Weblate -> Main from #2470 and #2647

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Anne Paz <anelisespaz@gmail.com>
Co-authored-by: weblate <1607653+weblate@users.noreply.github.com>
Co-authored-by: Bricaud Frédéric <frederic.bricaud@banq.qc.ca>
Co-authored-by: Carole Gagné <carole.gagne@banq.qc.ca>
2025-06-12 12:28:50 -04:00
sua yoo
826d70b649
docs: Update frontend dev docs (#2666)
Resolves https://github.com/webrecorder/browsertrix/issues/2633

## Changes

- Replaces broken link in frontend README with hosted and local links
- Clarifies that frontend is not deployed separately in dev docs
2025-06-12 10:21:58 -04:00
DaleLore
1a6d2a20c2
Documentation Update for Pausing and Resuming Crawl section (#2639)
- Rename 'Modifying Running Crawls' to 'Running Crawls'
- Add section about pausing/resuming crawls, and that paused crawls will eventually become stopped if not resumed.
- Add new crawl pausing, paused, resuming statuses and icons.

Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2025-06-10 21:47:03 -07:00