Skip to content

Update README - #11

Closed
winebarrel wants to merge 3 commits into
mainfrom
update-readme
Closed

winebarrel wants to merge 3 commits into
mainfrom
update-readme

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

This pull request primarily updates the README.md file to add a detailed Japanese-language description of the app and its features, and makes minor code changes to the WeatherItem.swift file to adjust protocol conformance and icon display logic.

Documentation improvements:

  • Added a comprehensive Japanese-language overview and feature list to the README.md, including details on weather data sources and app functionality.

Codebase adjustments:

  • Removed the Sendable protocol conformance from WeatherSource and WeatherItem enums and structs in WeatherItem.swift, likely for compatibility or simplification. [1] [2]
  • Modified the temperatureColor property in WeatherItem to use a multi-line format for clarity.
  • Updated the icon logic in WeatherItem so that during nighttime hours, both sunny and cloudy weather now display the "sun.max.fill" icon instead of "moon.stars.fill".

Copilot AI review requested due to automatic review settings April 27, 2026 13:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project documentation with a Japanese-language overview of TenkiMap and makes small Swift refactors (notably around Sendable conformance) plus a tweak to AMeDAS icon selection logic.

Changes:

  • Expanded README.md with a Japanese description, feature list, and data sources.
  • Removed Sendable conformances from several app model types and did minor formatting refactors.
  • Adjusted AMeDAS weather icon selection logic (nighttime behavior) and did minor readability formatting.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
TenkiMap/WeatherMapViewModel.swift Removes Sendable from MapMode and minor formatting tweaks.
TenkiMap/WeatherItem.swift Removes Sendable, reformats temperatureColor, and updates AMeDAS icon logic.
TenkiMap/JMAService.swift Removes Sendable from forecast-related types and applies formatting changes; still uses task groups.
TenkiMap/ContentView.swift Reorders imports.
TenkiMap/AreaHierarchyService.swift Removes Sendable from Municipality.
TenkiMap/AMEDASService.swift Removes Sendable from AMeDAS data types.
README.md Adds Japanese documentation (overview/features/data sources).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread TenkiMap/JMAService.swift
Comment on lines +134 to 140
struct Forecast {
let weatherCode: String
let weather: String?
let tempMin: String?
let tempMax: String?
let pop: String?
}

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forecast no longer conforms to Sendable, but it is used inside TaskResult: Sendable (see fetchForecasts), which requires all stored property types to be Sendable. As-is, this will fail to compile. Re-add Sendable conformance to Forecast (and any other nested types used in the task-group result) or remove/adjust the Sendable requirement in the task-group plumbing (only use @unchecked Sendable with a clear safety rationale).

Copilot uses AI. Check for mistakes.
Comment thread TenkiMap/JMAService.swift
Comment on lines 163 to 167
group.addTask {
let result = await fetchAndParse(apiCode: apiCode, offices: offices)
return TaskResult(timeDefines: result.timeDefines,
officePairs: result.officePairs, areaPairs: result.areaPairs)
officePairs: result.officePairs, areaPairs: result.areaPairs)
}

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

group.addTask { ... } uses an @Sendable task closure, and the captured offices value is [JMAOffice]. Since JMAOffice no longer conforms to Sendable, this will trigger Sendable-checking errors/warnings (and can be an error under strict concurrency). If you keep the task group, please restore Sendable on JMAOffice (it should be safe given it only stores value types), or refactor to avoid passing non-Sendable values into child tasks.

Copilot uses AI. Check for mistakes.
Comment thread TenkiMap/JMAService.swift
Comment on lines +251 to +252
into tempsByAreaDay: inout TempsByAreaDay)
{

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parseShortTermTemps is formatted with the closing ) and opening { split across lines. This makes the signature harder to read and is inconsistent with most of the codebase’s function declaration formatting. Consider either keeping ) and { on the same line, or fully formatting the signature/brace in a consistent multi-line style (but avoid the mixed style).

Suggested change
into tempsByAreaDay: inout TempsByAreaDay)
{
into tempsByAreaDay: inout TempsByAreaDay) {

Copilot uses AI. Check for mistakes.
Comment thread TenkiMap/JMAService.swift
Comment thread TenkiMap/WeatherItem.swift
Added images to the README for visual representation.
@winebarrel winebarrel closed this Apr 27, 2026
@winebarrel
winebarrel deleted the update-readme branch April 27, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants