Shopify / Shopify/shipit-engine

Hitting back doesn't show an up-to-date page

Open
#578 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
1.5k
Forks
154
Avg merge
2h 26m
Merged PRs (30d)
3

Description

When waiting for a while at the deploy/new page, it's possible that a few events make it into the backlog. If the user hits back after that, the page will be served from cache, and they will only catch-up to the backlog once a new event makes it in. This results in a page that is out of date.

Proposed solution: Improve PubSubStub to use fallback X-Last-Event-Id as HTTP param, and render it in the DOM. This would also fix the issue where an event occurs between the time the page is rendered and the time the clients registers to the topic.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start at the deploy/new page and inspect PubSubStub, focusing on the X-Last-Event-Id HTTP parameter and how its value is rendered in the DOM. Done means navigating back shows an up-to-date page and events occurring before client registration are caught up without waiting for another event.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.