Skip to content

revert: downgrade @headlessui/react and react-select - #445

Open
rushi wants to merge 1 commit into
xola:masterfrom
rushi:pin-headlessui-react-select
Open

revert: downgrade @headlessui/react and react-select#445
rushi wants to merge 1 commit into
xola:masterfrom
rushi:pin-headlessui-react-select

Conversation

@rushi

@rushi rushi commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

Test plan

  • npm run lint clean (pre-existing complexity warnings only)
  • npm test passes (9/9)
  • npm run build succeeds

Pin @headlessui/react to ^1.4.0 and react-select to ^5.7.0, reverting
the bump in xola#441. Newer versions are causing widespread Selenium
flakiness in downstream apps.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

Summary

  • Reverted @headlessui/react to ^1.4.0.
  • Reverted react-select to ^5.7.0.
  • Reduced Selenium flakiness in downstream applications.

Validation

  • npm run lint
  • npm test — 9/9 tests passed
  • npm run build

Walkthrough

Changes

Dependency constraint updates

Layer / File(s) Summary
Package dependency constraints
package.json
The @headlessui/react constraint changes from ^1.7.19 to ^1.4.0. The react-select constraint changes from ^5.10.2 to ^5.7.0.

Merge Risk: 🟡 Moderate · up to 19ed4

The dependency ranges still allow the newer versions associated with downstream Selenium flakiness, so this revert may not reliably restore stable behavior. Pinning the versions or adding upper bounds is needed before merge.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 98056162-ff2a-4513-b52b-97e7fcd2c43c

📥 Commits

Reviewing files that changed from the base of the PR and between 522c1cd and 19ed415.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • xola/x2-seller (manual)

Included review availability: 3 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour.

Comment thread package.json
},
"dependencies": {
"@headlessui/react": "^1.7.19",
"@headlessui/react": "^1.4.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

node <<'NODE'
const { dependencies } = require("./package.json");

for (const [name, version] of Object.entries({
  "`@headlessui/react`": "1.4.0",
  "react-select": "5.7.0",
})) {
  if (dependencies[name] !== version) {
    throw new Error(`${name} is not pinned to ${version}`);
  }
}
NODE

Repository: xola/ui-kit

Length of output: 780


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- package manifest ---'
cat -n package.json | sed -n '1,75p'

printf '%s\n' '--- package metadata and dependency lock entries ---'
node <<'NODE'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
console.log(JSON.stringify({
  name: pkg.name,
  version: pkg.version,
  private: pkg.private,
  publishConfig: pkg.publishConfig,
  dependencies: {
    '`@headlessui/react`': pkg.dependencies?.['`@headlessui/react`'],
    'react-select': pkg.dependencies?.['react-select'],
  },
}, null, 2));
NODE

python3 - <<'PY'
import json
from pathlib import Path

lock = json.loads(Path("package-lock.json").read_text())
for name in ("node_modules/@headlessui/react", "node_modules/react-select"):
    entry = lock.get("packages", {}).get(name)
    print(name, json.dumps(entry, sort_keys=True))
PY

printf '%s\n' '--- changed files and dependency history ---'
git diff --stat
git diff -- package.json package-lock.json
git log -8 --oneline -- package.json package-lock.json

Repository: xola/ui-kit

Length of output: 5269


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- dependency change commit ---'
git show --stat --format=fuller 19ed415
git show --format= -- package.json package-lock.json 19ed415 | sed -n '1,220p'

printf '%s\n' '--- repository references ---'
rg -n --hidden -g '!node_modules' -g '!build' \
  '1\.7\.19|5\.10\.2|`@headlessui/react`|react-select|Selenium|selenium|flak' . \
  | sed -n '1,240p'

Repository: xola/ui-kit

Length of output: 13340


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n --hidden -g '!node_modules' -g '!build' \
  '1\.7\.19|5\.10\.2|`@headlessui/react`|react-select|Selenium|selenium|flak' . \
  | sed -n '1,260p'

Repository: xola/x2-seller

Length of output: 3282


🏁 Script executed (no clone):

#!/usr/bin/env bash
set -euo pipefail

node <<'NODE'
try {
  const semver = require('semver');
  for (const [range, versions] of Object.entries({
    '^1.4.0': ['1.4.0', '1.7.19', '2.0.0'],
    '^5.7.0': ['5.7.0', '5.10.2', '6.0.0'],
  })) {
    console.log(range, Object.fromEntries(versions.map(v => [v, semver.satisfies(v, range)])));
  }
} catch (error) {
  console.error(`semver probe unavailable: ${error.message}`);
  process.exitCode = 2;
}
NODE

Length of output: 205


🏁 Script executed (no clone):

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
from dataclasses import dataclass

`@dataclass`(frozen=True)
class Version:
    major: int
    minor: int
    patch: int

def parse(value):
    return Version(*(int(part) for part in value.split(".")))

def caret_satisfies(base, candidate):
    # npm caret ranges for non-zero major versions:
    # ^M.m.p means >=M.m.p and <(M+1).0.0.
    return candidate >= base and candidate.major == base.major

checks = [
    ("^1.4.0", "1.7.19"),
    ("^5.7.0", "5.10.2"),
]
for range_text, version_text in checks:
    base = parse(range_text[1:])
    candidate = parse(version_text)
    result = caret_satisfies(base, candidate)
    print(f"{range_text} includes {version_text}: {result}")
    assert result
PY

Length of output: 320


🏁 Script executed (no clone):

#!/usr/bin/env bash
set -euo pipefail

python3 - <<'PY'
def parse(value):
    return tuple(int(part) for part in value.split("."))

def caret_satisfies(base, candidate):
    return candidate >= base and candidate[0] == base[0]

for range_text, version_text in [
    ("^1.4.0", "1.7.19"),
    ("^5.7.0", "5.10.2"),
]:
    base = parse(range_text[1:])
    candidate = parse(version_text)
    result = caret_satisfies(base, candidate)
    print(f"{range_text} includes {version_text}: {result}")
    assert result
PY

Length of output: 183


Pin the published dependency versions

^1.4.0 and ^5.7.0 allow the problematic @headlessui/react 1.7.19 and react-select 5.10.2 versions. Pin both dependencies, or add upper bounds that exclude them.

@rushi rushi closed this Aug 17, 2026
@rushi
rushi deleted the pin-headlessui-react-select branch August 17, 2026 04:14
@rushi
rushi restored the pin-headlessui-react-select branch August 17, 2026 04:18
@rushi rushi reopened this Aug 17, 2026
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