Skip to content

Conversation

Oksamies
Copy link
Contributor

No description provided.

Copy link

coderabbitai bot commented Sep 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

Copy link
Contributor Author

Oksamies commented Sep 17, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@anttimaki anttimaki left a comment

Choose a reason for hiding this comment

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

Not a blocker but would be mighty cool of you if you'd at least consider doing the suggested changes if they make sense to you. And "it can be done later" is a cheap copout.

Comment on lines 212 to 217
const isStale = _storage.safeGetValue(STALE_KEY);
if (!(typeof isStale === "string") || !(isStale === "no")) {
if (
forceUpdateCurrentUser ||
!(typeof isStale === "string") ||
!(isStale === "no")
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicks:

  1. There's no need to read isStale if forceUpdateCurrentUser is true
  2. The pattern of !(x === y) sort of read out like no(yes), which IMO is a bit confusing. Why not just use x !== y?
  3. Using the strict equality operator (===) in isStale === "no" already checks for the type, so the check with typeof is redundant

Put together, this would reduce into

if (forceUpdateCurrentUser || _storage.safeGetValue(STALE_KEY) !== "no") {

Is guaranteed to return either "yes" or "no" (i.e. no undefined oslt), it might be better to use _storage.safeGetValue(STALE_KEY) === "yes" to avoid that "not 'no'" scenario again.

@Oksamies Oksamies changed the base branch from 09-17-ensure_current_user_is_updated to graphite-base/1541 September 18, 2025 15:48
@Oksamies Oksamies force-pushed the 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser branch from f446eed to a5a3db6 Compare September 18, 2025 15:53
@Oksamies Oksamies changed the base branch from graphite-base/1541 to 09-17-ensure_current_user_is_updated September 18, 2025 15:53
@Oksamies
Copy link
Contributor Author

ESLint and CodeQL checks are failing because Graphite created a temporary branch when I was fixing and submitting code in each PR in order. (someone has limited the maximum amount of pushes to 2 in a single command and graphite normally tries to do the whole stack at once to prevent needing to create temporary branches)

@Oksamies Oksamies changed the base branch from 09-17-ensure_current_user_is_updated to graphite-base/1541 September 18, 2025 17:27
@Oksamies Oksamies force-pushed the 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser branch from a5a3db6 to 48c96f4 Compare September 18, 2025 17:28
@Oksamies Oksamies changed the base branch from graphite-base/1541 to 09-17-ensure_current_user_is_updated September 18, 2025 17:28
@Oksamies Oksamies requested a review from anttimaki September 18, 2025 17:35
@Oksamies Oksamies changed the base branch from 09-17-ensure_current_user_is_updated to graphite-base/1541 September 19, 2025 11:18
@Oksamies Oksamies force-pushed the 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser branch from 48c96f4 to 67a0ad8 Compare September 19, 2025 11:18
@Oksamies Oksamies changed the base branch from graphite-base/1541 to 09-17-ensure_current_user_is_updated September 19, 2025 11:19
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.

2 participants