Show the weekdays-only notice after an in-place weekend redirect

オープン 初心者向け
#463 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend, testing

調査の方向性

TaskFlow.Web/src/pages/JournalPage.tsxから始め、notificationMsgがどのように初期化され、weekendRedirectとfocusTaskIdがどのように処理されるかを確認します。次に、JournalPageのVitestテストを見つけ、通知を閉じることとリダイレクトフラグだけをクリアすることを含め、4つの受け入れ条件を網羅してください。4つの動作すべてがテストに合格すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Follow-up to #404 (merged in #462). Found during that run. Not groomed. Web only.

Problem

/journal/:date redirects a weekend date to the previous Friday when "weekdays only" is on. The redirect is in-place (navigate(..., { replace: true, state: { weekendRedirect: true } }) in TaskFlow.Web/src/pages/JournalPage.tsx), so JournalPage stays mounted. The notice "Weekdays only — redirected to Friday" is read once, in the initial value of useState (notificationMsg), so it does not appear after an in-place redirect. It appears only when the page mounts directly on Friday with weekendRedirect state (for example after a refresh).

Reproduce: turn weekdays-only on, open the journal on a weekday, then navigate to a Saturday (a link, the URL, or the date shortcuts). The page lands on Friday with no notice.

This is not caused by #404, which only made the redirect keep other one-shot state. The user is moved to another day with no explanation.

Change

Show the notice whenever the location carries weekendRedirect, including after an in-place redirect, and keep it dismissible as it is today. Keep clearing the flag so a later refresh does not repeat it, but do not drop other one-shot state (focusTaskId, see docs/FRONTEND.md "Origin state and back link").

Acceptance criteria

  1. An in-place weekend redirect shows "Weekdays only — redirected to Friday".
  2. Mounting directly on Friday with weekendRedirect state still shows it, once.
  3. A later refresh or revisit does not show it again.
  4. A redirect that carries focusTaskId still returns focus to the row (the #404 behavior).
  5. Vitest tests for 1 to 4.

Out of scope

  • Changing the weekdays-only rule or the redirect target.
主要言語
C#
スター
1
フォーク
0
平均マージ
2時間 2分
マージ済み PR(30日)
98

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nevridge/TaskFlow のほかの issue

nevridge/TaskFlow の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。