Skip to content

Conversation

Oksamies
Copy link
Contributor

No description provided.

@coderabbitai
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

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

@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 209 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
@Oksamies Oksamies force-pushed the 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser branch from 67a0ad8 to c7c481d Compare September 23, 2025 12:57
@Oksamies Oksamies force-pushed the 09-17-ensure_current_user_is_updated branch from ec751c6 to 1d4ac35 Compare September 23, 2025 12:57
Base automatically changed from 09-17-ensure_current_user_is_updated to master September 23, 2025 13:03
@Oksamies Oksamies merged commit a6ace7b into master Sep 23, 2025
32 of 33 checks passed
@Oksamies Oksamies deleted the 09-17-add_a_option_to_force_currentuser_update_to_getsessioncurrentuser branch September 23, 2025 13:04
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