Skip to content

Keeping track of public documents I visited while being anonymous #819

Open
@sampaccoud

Description

@sampaccoud

Bug Report

Problematic behavior
It's the second time a user gives me the following feedback:

When I visit a public document, I want it to be listed in my documents otherwise I can't find it the next time I come to Docs.

After investigating, it turns out that the users encountering this issue, were not connected when they visited the public document. In this case, the backend has not created the entry in the LinkTrace table because no user was logged-in...

Expected behavior/code
When a user visits a public Document as anonymous (happens a lot on federations that have a short lived session). We should be able to track the visit the next time the user logs in to Docs.

Steps to Reproduce

  1. Create a public document with user A
  2. Open a private browser session
  3. Visit the document without being logged-in
  4. Log-in with a user B
  5. The document is not listed on the home page. It should be.

Environment

  • Impress version: 2.6.0
  • Platform: Docker/k8s

Possible Solution
We can develop a solution without modifying the backend.

  1. When an anonymous user visits a public document, keep track of the visit in localstorage
  2. When a user logs-in, check the records in localstorage and make a get on each document after logging the user so that all visits are accounted for in the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededjavascriptPull requests that update Javascript code

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions