Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build_test

on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

CI currently runs yarn install without enforcing the checked-in yarn.lock. This can lead to non-reproducible installs (and unexpected lockfile changes) depending on the Yarn version and registry state. Consider using yarn install --frozen-lockfile (Yarn v1) so CI fails when the lockfile is out of sync.

Suggested change
- run: yarn install
- run: yarn install --frozen-lockfile

Copilot uses AI. Check for mistakes.
- run: yarn build
15 changes: 15 additions & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: jest

on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: yarn install
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

CI currently runs yarn install without enforcing the checked-in yarn.lock. This can lead to non-reproducible installs (and unexpected lockfile changes) depending on the Yarn version and registry state. Consider using yarn install --frozen-lockfile (Yarn v1) so CI fails when the lockfile is out of sync.

Suggested change
- run: yarn install
- run: yarn install --frozen-lockfile

Copilot uses AI. Check for mistakes.
- run: yarn test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {toSlug} from '../../../utils/methods';

Enzyme.configure({adapter: new Adapter()});

// jsdom does not implement scrollIntoView
Element.prototype.scrollIntoView = jest.fn();

const questions = [
{
"id": 93,
Expand Down
8 changes: 7 additions & 1 deletion src/components/inputs/upload-input-v2/dropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'dropzone/dist/dropzone.css';
import {Icon} from './icon'
import PropTypes from 'prop-types';
import {getAccessToken, initLogOut} from '../../security/methods';
import {AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR} from '../../security/constants';
import {getMD5} from "../../../utils/crypto";

let Dropzone = null;
Expand Down Expand Up @@ -61,7 +62,12 @@ export class DropzoneJS extends React.Component {
} catch (e) {
console.log(e);
this.onError(e);
initLogOut();
// only logout on genuine auth errors, not transient network failures
if (!e.message || !e.message.startsWith(AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR)) {
initLogOut();
}
done(e.message || 'Auth error');
return;
}
if (options.maxFiles && options.maxFiles < (this.state.files.length + this.props.uploadCount)) {
done('Max files reached.');
Expand Down
Loading
Loading