OpenFn / OpenFn/lightning

AI Disclaimer: move timestamp logic to the clientside

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

Nobody has claimed this yet.

bug
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

At the moment the AI disclaimer splash screen will show once every 24 hours, using a server-side timestamp

This doesn't strictly meet the design, which says that the disclaimer splash should be shown once per day.

The problem here is timezones 🎉 The server doesn't know the user's timezone so doesn't know what day it is for the user.

My preferred solution here would be to move the timestamping logic into the client, writing it to local storage. This WILL reflect the user's actual day (assuming they're not on a plane). The caveat here is that if you switch device or browser, you'll get multiple popups a day 🤷

We might want to wait for the react rewrite of the frontend before doing this work

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 with the current AI disclaimer splash implementation and review how its server-side timestamp is recorded. Compare this with the planned React frontend and determine where client-side local storage should track the user's calendar day. Done means the splash appears once per local day, with the device or browser limitation documented or accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, react
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.