Skip to content

financialStatements全面修正#5

Merged
ROhta merged 10 commits into
mainfrom
cron
Jan 27, 2026
Merged

financialStatements全面修正#5
ROhta merged 10 commits into
mainfrom
cron

Conversation

@ROhta
Copy link
Copy Markdown
Owner

@ROhta ROhta commented Jan 25, 2026

No description provided.

@ROhta ROhta self-assigned this Jan 25, 2026
Copilot AI review requested due to automatic review settings January 25, 2026 15:15
@ROhta ROhta enabled auto-merge January 25, 2026 15:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

financialStatements 配下を Vite + React ベースの汎用コンポーネント構成に再設計し、企業ごとの JSON データから財務諸表を描画できるようにしたうえで、GitHub Pages への自動デプロイと依存関係管理を追加しています。
P/L・B/S・C/F の UI をコンポーネント分割し、チャート設定やコメント生成ロジックを共通化/外部 JSON 化した構成になっています。

Changes:

  • Vite + React + Tailwind 構成の financialStatements フロントエンドを新規導入し、URL パラメータで指定した JSON から財務諸表を描画するアプリに刷新。
  • P/L・B/S・C/F をセクションコンポーネント(PLSection / BSSection / CFSection)や共通コンポーネント(MetricCard / BreakdownPanel / ChartTooltip 等)として分離し、デフォルトチャート設定・コメント生成ロジックを constants / utils に集約。
  • GitHub Pages 向けのビルド・デプロイ用ワークフローと Dependabot 設定、企業分析用 Issue テンプレートや抽出エージェント仕様を追加。

Reviewed changes

Copilot reviewed 28 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
financialStatements/vite.config.js Vite のエントリ設定と React/Tailwind プラグイン、GitHub Pages 用の base パスを定義し、financialStatements アプリをビルド可能にしています。
financialStatements/utils/formatters.js 金額(百万円→億円)やパーセンテージ、前年比変化のマイナス判定などの共通フォーマッタを切り出し、各コンポーネントから再利用できるようにしています。
financialStatements/public/kakiyasu2026.json 柿安本店の P/L・B/S・C/F と比較用時系列データ、チャート設定・コメントを JSON で定義し、フロント側がデータ駆動で描画できるようにしています。
financialStatements/pnpm-lock.yaml financialStatements サブアプリ用の依存関係(React, Vite, Tailwind, Recharts など)を pnpm ロックファイルとして固定し、再現性のあるインストールを保証しています。
financialStatements/package.json financial-statements アプリのパッケージメタデータ・Node/pnpm エンジン要件・依存パッケージと、vite ベースの dev/build スクリプトを定義しています。
financialStatements/main.jsx React エントリポイントとして App コンポーネントを #root にマウントし、アプリの起動処理を定義しています。
financialStatements/index.html 日本語ロケールのベース HTML と #root 要素、/main.jsx をモジュールスクリプトとして読み込む Vite 標準のエントリ HTML を追加しています。
financialStatements/index.css Tailwind CSS v4 を @import "tailwindcss"; で読み込み、ユーティリティクラスを全体に適用できるようにしています。
financialStatements/hooks/useCompanyData.js URL パラメータ companyData から JSON ファイル名を取得し、import.meta.env.BASE_URL 配下の JSON をフェッチしてローディング/エラー状態とともに返すカスタムフックを定義しています。
financialStatements/hooks/useChartSettings.js 渡された chartSettings をデフォルト設定とマージして返す useChartSettings フックを提供し、企業ごとのスケール調整と共通デフォルトの両立を図っています。
financialStatements/financialStatements.jsx 旧モノリシック構成を廃止し、タブ状態・指標計算・デフォルトコメント生成・PL/BS/CF 各セクションの切り替えを担う FinancialStatements コンポーネントに刷新しています。
financialStatements/constants/defaultSettings.js P/L・B/S・C/F のデフォルトチャート domain/ticks と、B/S・C/F のデフォルトコメント文言を計算された指標から生成する関数を定義しています。
financialStatements/constants/colors.js P/L/B/S/C/F それぞれの系列名に対応するカラーパレットと、B/S 積み上げグラフ用 Legend ペイロードを共通定義しています。
financialStatements/components/TabButton.jsx タブ切替用ボタンの見た目とアクティブ/非アクティブ時スタイルを共通コンポーネントとして切り出しています。
financialStatements/components/PLSection.jsx P/L メトリクスカード・単年度損益構造グラフ・複数期比較グラフ・各項目の内訳パネルをまとめた P/L セクションコンポーネントを新設しています(ただし複数期比較の純利益系列キーに不整合があります)。
financialStatements/components/MetricCard.jsx ラベル・値・単位・前年比変化(色分け含む)を表示する共通カードコンポーネントとして実装し、P/L/B/S/CF で再利用しています。
financialStatements/components/ChartTooltip.jsx P/L/C/F/B/S 向けのツールチップコンポーネントを分離し、金額表示や色分け、積み上げグラフでの合計表示ロジックを共通化しています。
financialStatements/components/CFSection.jsx C/F メトリクスカード、構成棒グラフ、現金増減フロー、複数期比較、内訳パネルをまとめた CF セクションを新規実装し、色やスケールを COLORS と設定値から参照するようにしています。
financialStatements/components/BreakdownPanel.jsx 各種「内訳」パネルの見た目を統一するためのパネル&行コンポーネントを提供し、PL/BS/CF の詳細表示で利用しています。
financialStatements/components/BSSection.jsx B/S メトリクスカード、積み上げ棒グラフ、資産/負債・純資産内訳パネルをまとめた BS セクションを実装し、Legend や棒内ラベルも共通化しています。
financialStatements/README.md financialStatements アプリの起動方法、companyData URL パラメータ仕様、企業データ JSON スキーマ(chartSettings/comments の記法やデフォルト挙動)を日本語で整理しています。
financialStatements/App.jsx useCompanyData を用いて JSON を読み込み、ローディング/エラー画面を挟んだ上で FinancialStatements を描画するアプリケーションエントリコンポーネントを追加しています(ただしインポートパスの大文字・小文字が実ファイル名と一致していません)。
analyzeStocks/README.md 認証トークン取得と株式分析スクリプトの実行順に説明を補足していますが、2 行目の区切り記号が 1 行目と不統一になっています。
SECURITY.md セキュリティポリシーの表現を「Dependabot Alerts」から「Dependabot」に簡略化し、依存関係管理方針を明確化しています。
.vscode/settings.json スペルチェック辞書に kakiyasu を追加し、エディタ上での警告を抑制しています。
.gitignore Node プロジェクト用に node_modules/ とビルド成果物 dist/ を無視対象に設定し、リポジトリをクリーンに保つようにしています。
.github/workflows/deploy.yml financialStatements ディレクトリを対象に pnpm + Node 24 でビルドし、deploy/financialStatements 以下へコピーしたうえで GitHub Pages に自動デプロイするワークフローを追加しています。
.github/dependabot.yml npm と GitHub Actions 用の Dependabot 更新ルールを追加していますが、npm 側で未サポートの directories キーを使用しているため期待どおり動作しない可能性があります。
.github/ISSUE_TEMPLATE/company-analysis.yml 企業分析の結果を記録するための Issue テンプレート(企業名・証券コード・市場・業種・分析日など)を定義しています。
.claude/agents/financial-data-extractor.md 決算資料等から companyData JSON を生成するための財務データ抽出エージェント仕様を詳細に記述し、今後の自動化に備えています。
Files not reviewed (1)
  • financialStatements/pnpm-lock.yaml: Language not supported

Comment thread financialStatements/components/PLSection.jsx
Comment thread .github/dependabot.yml Outdated
Comment thread analyzeStocks/README.md Outdated
Comment thread financialStatements/App.jsx Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: RO <13445921+ROhta@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 26, 2026 06:03
ROhta and others added 2 commits January 26, 2026 15:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: RO <13445921+ROhta@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: RO <13445921+ROhta@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 28 out of 30 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • financialStatements/pnpm-lock.yaml: Language not supported

Comment thread analyzeStocks/README.md
Comment thread financialStatements/components/BreakdownPanel.jsx Outdated
@ROhta ROhta disabled auto-merge January 27, 2026 09:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: RO <13445921+ROhta@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 27, 2026 09:16
@ROhta ROhta merged commit b645de0 into main Jan 27, 2026
6 checks passed
@ROhta ROhta deleted the cron branch January 27, 2026 09:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 28 out of 30 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • financialStatements/pnpm-lock.yaml: Language not supported

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