Refresh repository jobs when a background sync finishes between dashboard polls

Open Beginner friendly
#419 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, python
Domain
frontend

Research direction

Read dashboard/src/views/RepositoryDetailView.vue, especially the job list setup around line 40 and refresh logic around line 106. Update the refresh condition to account for last_synced_at advancing even when both responses are idle, then extend the refresh test with two idle responses, a new sync timestamp, and a newly added job requiring approval. Done when the job list and approval checklist update without a page reload.

Written by the indexing model from the issue text.

Description

code-review secondshift

Likelihood is moderate on actively maintained repositories. A background sync that starts and finishes between dashboard polls can leave the job list and approval checklist stale until reload. The fix is localized to the repository detail view and its refresh test.

dashboard/src/views/RepositoryDetailView.vue:40 builds the job list and capability checklist from the repository's latest job IDs plus the cached app.jobs. The refresh at line 106 only reloads app.jobs after it observes syncing change from true to false. With a 60-second idle poll, a normal fast sync can complete entirely between two reads. The header can then show an updated job count while a new job is absent from the list and its required approval is missing from the checklist.

Refresh the job data when last_synced_at advances, including when both reads return syncing: false. Test two consecutive idle responses with a new sync timestamp and a newly added job requiring approval.


Opened by SecondShift from run 1 at 07bfa80ed42b.

Dominant language
Python
Stars
1
Forks
1
Avg merge
1h 9m
Merged PRs (30d)
322

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from piotrekno1/second-shift

All issues in piotrekno1/second-shift

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.