spike: review how the client timezone is passed to the API
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp, javascript, openapi
調査の方向性
Start by reading the seven named request DTOs and their validators, then trace each endpoint’s handling of the offset and its omission behavior. Compare the web files src/api/journal.ts and src/lib/journal-utils.ts with assistant ApiModels.cs, TaskFlowApiClient.cs and Tools/ for sign or staleness issues. Done means posting the endpoint inventory, option comparison, recommendation and cost, and opening follow-up issues if a refactor is recommended.
索引モデルが issue の本文から書いたものです。
説明
Found while reviewing the assistant-builder agent for #400 (piece 8). The client's timezone reaches the API as a bare integer, timezoneOffsetMinutes, and the meaning of that integer is written down almost nowhere. This spike looks at whether the representation should change.
What I found
- Seven request DTOs carry
int? TimezoneOffsetMinutes:AddJournalTodoDto,CarryForwardRequestDto,CreateJournalEntryDto,CreateTaskItemDto,JournalDayQueryDto,PatchTaskItemDtoandUpdateTaskItemDto. The validators bound it (CarryForwardRequestDtoValidatorsays -720 to 840, "UTC-12:00 to UTC+14:00"). - The sign convention (minutes east of UTC, so UTC-7 is -420) is stated in no code comment on the parameter. The assistant's
InputParsing.LocalNowand the web'sgetTimezoneOffsetMinutes()both produce it, and JavaScript's ownDate.getTimezoneOffset()uses the opposite sign (minutes west). The assistant agent file carried the rule as prose, which #400 cuts, so a code comment onInputParsing.LocalNowis the interim fix. - The same value is hand-copied into three places: the API DTOs, the web (
src/api/journal.tsandsrc/lib/journal-utils.ts) and the assistant (ApiModels.cs,TaskFlowApiClient.cs,Tools/). About 30 assistant tests assert the exact integer. - A single offset cannot describe a zone whose offset changes with the date (daylight saving). The offset sent is the one at the moment of the request, so a date in the past or future can be off by an hour.
- What happens when the offset is omitted is described in different places in different words, for example "UTC when omitted" in
JournalEntriesControllerand the due-date wording inPatchTaskItemDto, while the carry-forward rule in CLAUDE.md says "no UTC fallback". They may all be consistent; this spike checks.
Scope
- Inventory every endpoint that accepts the offset and record, for each, what the server does with it and what it does when the offset is missing.
- Check each client (web, assistant) for the sign convention and for any place that sends a stale or inverted value.
- Compare these options for how the client's timezone reaches the server:
- Keep the integer, document it. DTO doc comments, an OpenAPI description, and one shared definition in each client.
- A single request header or middleware (for example
X-Timezone-Offset), so DTOs stop carrying it and the rule is written once. - An IANA zone id (for example
America/Los_Angeles) converted on the server, which handles daylight saving per date. - Anything else the inventory suggests.
- For the best option, estimate the change: API, web, assistant, tests, and any migration of stored data (none expected).
- Recommend one option and say what it costs.
Acceptance criteria
- The inventory table is posted on this issue: each endpoint, what it does with the offset, and its behavior when omitted.
- Any place that sends a wrong-signed or stale offset is listed as its own bug, or the issue says none exist.
- The three options are compared against the inventory, with a recommendation.
- If a refactor is recommended, follow-up issues are opened for it; if not, the issue says what documentation to add instead.
Out of scope
- The carry-forward behavior itself (#415, #409 and #406 cover journal reliability). This issue is only about how the timezone is represented and passed.
- Changing any behavior in this spike. It produces a decision and issues.
- The interim code comment on
InputParsing.LocalNow. #400's build makes that edit.
- 主要言語
- C#
- スター
- 1
- フォーク
- 0
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 98
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nevridge/TaskFlow のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
nevridge/TaskFlow の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
juandresrodca/AdminForge#54 ·
-
要トリアージ 辞書
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
yksr-melt/Meltype#1625 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs typoオープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
MonoGame/docs.monogame.github.io#328 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
space-wizards/RobustToolbox#7197 ·
メンテナーはふだん 1 日以内に返信
-
documentation high priority
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
lachydotmcg/capri-desktop#201 ·
メンテナーはふだん 1 日以内に返信