tilt-dev / tilt-dev/tilt

when viewing snapshots, duplicate headers are sometimes displayed

Open
#2,935 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Description

repro:

in firefox, open a snapshot, e.g. this one
close the tab
undo the close tab (on Mac, cmd+shift+T)

expected:

the snapshot looks just as it did before it was closed

observed:

the header gets duplicated:
image

misc notes:

  • I first became aware of this from a user who seemed to be getting this pretty regularly through "normal" snapshot usage, without any kind of tab-unclosing. I haven't found a repro without tab-closing.
  • The duplicate headers are, indeed, the manifestation of nested iframes. Apparently something's going funky with the ?content=true:
    image
  • I was also able to repro this in Chrome with the same steps, with one difference: In Chrome, if I refresh the tab, the extra header goes away.
  • In Firefox, every time I refresh with cmd+R, another header is added!
  • However, if I refresh with cmd+shift+R (refresh and ignore browser cache), it goes back to the desired state with just one header, which points pretty strongly at some unexpected behavior with browser caching.
  • Maybe this is as simple as setting some cache control headers?

Contributor guide

Open the contributing guide

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 by reproducing the snapshot URL in Firefox and Chrome, then inspect the nested iframe behavior around ?content=true during tab restore and refresh. The fix is complete when reopening or refreshing a snapshot consistently leaves one header instead of duplicating it.

Written by the indexing model from the issue text.

Assessment

Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.