Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: diff panel unclosable after retainSearchParams middleware #937

Mergedeggfriedrice24(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/937/headmerged by juliusmarminge View on GitHub

Summary

  • retainSearchParams(["diff"]) re-injects diff from the current URL when close actions omit the key, making the panel unclosable
  • Fix: set diff: undefined explicitly so the key is present (in check passes) and the middleware skips it
  • Widen DiffRouteSearch types to accept undefined so no casts are needed

Closes #935 Closes #931

Test plan

  • bun typecheck passes
  • Open diff panel -> close it -> panel closes (diff not re-injected)
  • Open diff panel -> switch thread -> panel stays open
  • Close diff panel -> switch thread -> panel stays closed
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. 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.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: 64a0f8e4-1dc3-4beb-9059-5a03eda76040

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

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. maria-rckscommented

      linked to #931

      could you update the description so it also auto-closes this one too?

    4. maria-rcks added labelsbug

    5. maria-rcks assignedmaria-rcks

    6. maria-rcks unassignedmaria-rcks

    7. maria-rcks assignedeggfriedrice24

    8. @maria-rcks timezone diff, sorry updated. ready @juliusmarminge.

    9. maria-rcks added labelsneeds-julius

    10. juliusmarminge approved these changes

    11. juliusmarminge merged thisa33cc8c

    12. juliusmarminge closed this

Sign in to join this conversation.