Skip to content

fix(renterd): contract timeline current block height #1189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

alexfreska
Copy link
Member

@alexfreska alexfreska commented Jul 16, 2025

  • Fixed an issue where the contract timeline would show the current block height indicator at the incorrect height.
    • It was showing the estimated height rather than the currentHeight variable which uses node block height unless it is still syncing.

Screenshot 2025-07-16 at 9.58.59 AM.png

@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 13:57
Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
renterd ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 2:00pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2025 2:00pm
explorer-zen ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2025 2:00pm
hostd ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2025 2:00pm

Copy link

changeset-bot bot commented Jul 16, 2025

🦋 Changeset detected

Latest commit: 3855c96

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
renterd Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member Author

alexfreska commented Jul 16, 2025

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

@alexfreska alexfreska requested review from chris124567, peterjan and telestrial and removed request for Copilot July 16, 2025 13:57
@github-project-automation github-project-automation bot moved this to In Progress in Sia Jul 16, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the incorrect placement of the current block height indicator in the contract timeline by switching from directly using syncStatus.estimatedBlockHeight to a dedicated currentHeight variable, and updates the memo dependencies accordingly. It also adds a changeset entry for a renterd patch release.

  • Replace syncStatus.estimatedBlockHeight with currentHeight in ContractTableContext
  • Update useMemo dependency array to depend on currentHeight instead of syncStatus.estimatedBlockHeight
  • Add a .changeset entry for the patch

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/renterd/contexts/contracts/index.tsx Switched context field to currentHeight and updated useMemo dependencies
.changeset/tricky-pillows-smoke.md Added a patch changeset entry describing the fix for the timeline block height indicator issue
Comments suppressed due to low confidence (2)

apps/renterd/contexts/contracts/index.tsx:129

  • [nitpick] The variable name "currentHeight" is somewhat ambiguous; consider renaming it to "currentBlockHeight" for clarity.
      currentHeight,

apps/renterd/contexts/contracts/index.tsx:127

  • Consider adding a unit or integration test to verify that the contract timeline correctly renders the current block height indicator using the updated currentHeight value.
  const cellContext = useMemo(() => {

@alexfreska alexfreska merged commit 47d1210 into main Jul 16, 2025
73 checks passed
@alexfreska alexfreska deleted the fix_renterd_contract_timeline_current_block_height branch July 16, 2025 18:51
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants