Skip to content

fix: Smart/Origin: no maximum number of transfers by default#4435

Merged
brunobesson merged 50 commits into
masterfrom
smart-origin/fix_max_nb_transfers
Oct 18, 2025
Merged

fix: Smart/Origin: no maximum number of transfers by default#4435
brunobesson merged 50 commits into
masterfrom
smart-origin/fix_max_nb_transfers

Conversation

@lgourdin
Copy link
Copy Markdown
Contributor

@lgourdin lgourdin commented Oct 1, 2025

this PR fixes bug n°1786 (on S/O ticket platform)

Summary by CodeRabbit

  • Bug Fixes
    • Transfer limit setting is now consistently applied across all trip searches, including extended timeframe queries.
    • When the transfer limit toggle is off, searches correctly run with no cap on transfers.
    • Prevents cases where the max transfers preference was ignored or inconsistently handled.

lgourdin and others added 30 commits September 16, 2025 16:08
Bumps [@snyk/protect](https://github.com/snyk/snyk) from 1.1298.0 to 1.1298.1.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Commits](snyk/cli@v1.1298.0...v1.1298.1)

---
updated-dependencies:
- dependency-name: "@snyk/protect"
  dependency-version: 1.1298.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@snyk/protect](https://github.com/snyk/snyk) from 1.1298.1 to 1.1298.2.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Commits](snyk/cli@v1.1298.1...v1.1298.2)

---
updated-dependencies:
- dependency-name: "@snyk/protect"
  dependency-version: 1.1298.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sass](https://github.com/sass/dart-sass) from 1.89.2 to 1.90.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.89.2...1.90.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.90.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.44.0 to 3.45.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.45.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-version: 3.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps openresty/openresty from 1.27.1.2-2-bookworm to 1.27.1.2-3-bookworm.

---
updated-dependencies:
- dependency-name: openresty/openresty
  dependency-version: 1.27.1.2-3-bookworm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [tj-actions/branch-names](https://github.com/tj-actions/branch-names) from 8 to 9.
- [Release notes](https://github.com/tj-actions/branch-names/releases)
- [Changelog](https://github.com/tj-actions/branch-names/blob/main/HISTORY.md)
- [Commits](tj-actions/branch-names@v8...v9)

---
updated-dependencies:
- dependency-name: tj-actions/branch-names
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [cross-env](https://github.com/kentcdodds/cross-env) from 7.0.3 to 10.0.0.
- [Release notes](https://github.com/kentcdodds/cross-env/releases)
- [Changelog](https://github.com/kentcdodds/cross-env/blob/main/CHANGELOG.md)
- [Commits](kentcdodds/cross-env@v7.0.3...v10.0.0)

---
updated-dependencies:
- dependency-name: cross-env
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 10.1.5 to 10.1.8.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-config-prettier@v10.1.5...v10.1.8)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-version: 10.1.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.2.1 to 4.2.5.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/eslint-plugin-prettier@v4.2.1...v4.2.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 4.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sass](https://github.com/sass/dart-sass) from 1.90.0 to 1.91.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.90.0...1.91.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.91.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@snyk/protect](https://github.com/snyk/snyk) from 1.1298.2 to 1.1299.0.
- [Release notes](https://github.com/snyk/snyk/releases)
- [Commits](snyk/cli@v1.1298.2...v1.1299.0)

---
updated-dependencies:
- dependency-name: "@snyk/protect"
  dependency-version: 1.1299.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.13 to 1.11.18.
- [Release notes](https://github.com/iamkun/dayjs/releases)
- [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.18/CHANGELOG.md)
- [Commits](iamkun/dayjs@v1.11.13...v1.11.18)

---
updated-dependencies:
- dependency-name: dayjs
  dependency-version: 1.11.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.45.0 to 3.45.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.45.1/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-version: 3.45.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
dependabot Bot and others added 20 commits September 16, 2025 16:35
Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5 to 6.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](amannn/action-semantic-pull-request@v5...v6)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.20.0 to 16.23.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@16.20.0...16.23.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.23.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) from 5.0.8 to 5.0.9.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.9/packages/@vue/cli-service)

---
updated-dependencies:
- dependency-name: "@vue/cli-service"
  dependency-version: 5.0.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) from 5.0.8 to 5.0.9.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.9/packages/@vue/cli-plugin-babel)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-babel"
  dependency-version: 5.0.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) from 5.0.8 to 5.0.9.
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v5.0.9/packages/@vue/cli-plugin-eslint)

---
updated-dependencies:
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-version: 5.0.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Add CPS 2025 in the list
Bumps [sass](https://github.com/sass/dart-sass) from 1.90.0 to 1.92.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.90.0...1.92.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.92.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@github-actions github-actions Bot added the bug Something isn't working label Oct 1, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 1, 2025

Walkthrough

Introduced a computed property maxNbTransfers in PlanATripSection.vue and updated two API request payloads to send max_nb_transfers using this value instead of maxTransfers.

Changes

Cohort / File(s) Summary
Trip planning logic and API payloads
src/views/document/utils/boxes/PlanATripSection.vue
Added computed maxNbTransfers returning maxTransfers when limitTransfers is true, else -1. Replaced payload fields to use max_nb_transfers: this.maxNbTransfers in outbound and extended timeframe journey requests.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant C as PlanATripSection (Vue)
  participant API as Journey API

  U->>C: Configure trip (limitTransfers, maxTransfers)
  C->>C: Compute maxNbTransfers = limitTransfers ? maxTransfers : -1
  C->>API: Request outbound journey<br/>with payload { max_nb_transfers: maxNbTransfers }
  API-->>C: Outbound results

  Note over C: For extended timeframe
  C->>API: Request extended timeframe<br/>with { max_nb_transfers: maxNbTransfers }
  API-->>C: Extended results
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at transfer counts,
Hop-hop, the logic cleanly mounts.
If limits set, we send the max—
Else −1 guides our API tracks.
Carrots packed, requests in pairs,
I bound through routes without despairs. 🥕🚆

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly summarizes the primary bug fix by indicating that, in the Smart Origin feature, there will be no maximum number of transfers by default, which directly reflects the addition of the maxNbTransfers computed property returning -1 when transfers are unlimited and the corresponding API payload updates. It is clear, specific, and focused on the key change without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch smart-origin/fix_max_nb_transfers

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1b029b and 700d034.

📒 Files selected for processing (1)
  • src/views/document/utils/boxes/PlanATripSection.vue (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build (lts/*)
🔇 Additional comments (3)
src/views/document/utils/boxes/PlanATripSection.vue (3)

755-759: LGTM! Clean fix for the transfer limit bug.

The computed property correctly returns -1 (no limit) when limitTransfers is false, and the actual maxTransfers value when the user opts to limit connections. This addresses the bug where users would unintentionally be limited to 0 transfers (direct routes only) by default.


943-956: Correct usage of the new computed property.

The outbound journey request now properly uses maxNbTransfers, which will send -1 when no transfer limit is set, allowing the API to return routes with any number of connections.


992-1010: Consistent application of the fix in extended timeframe request.

The fallback journey request also correctly uses maxNbTransfers, ensuring consistent behavior when searching for the last journey of the day.


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 and usage tips.

@brunobesson brunobesson merged commit c665591 into master Oct 18, 2025
9 checks passed
@brunobesson brunobesson deleted the smart-origin/fix_max_nb_transfers branch October 18, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants