AOSSIE-Org / AOSSIE-Org/OrgExplorer

Refactor: Centralize localStorage Operations in a Storage Utility

オープン
#194 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
JavaScript
スター
34
フォーク
92
平均マージ
8日 7時間
マージ済み PR(30日)
12

説明

## Problem

`AppContext.jsx` currently contains direct `localStorage` operations for:

* PAT (`oe_pat`)
* Rate limit (`oe_rate_limit`)
* Recent searches (`oe_recent`)

This couples storage logic with application state and makes it harder to maintain.

## Proposed Solution

Create a reusable storage utility at:

`src/utils/storage.js`

The utility should:

* Centralize `localStorage` access
* Define storage keys using `STORAGE_KEYS`
* Provide `get`, `set`, and `remove` methods

Then update `src/context/AppContext.jsx` to use the storage utility instead of accessing `localStorage` directly.

## Expected Result

* No direct `localStorage` calls in `AppContext.jsx`
* Storage keys have a single source of truth
* Existing PAT, rate-limit, and recent-search behaviour remains unchanged

**Type:** Code Quality Improvement

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reading src/context/AppContext.jsx to locate the PAT, rate-limit, and recent-search localStorage operations, then inspect the surrounding src/utils structure. Use the issue's expected results as the checklist: storage access and keys are centralized in src/utils/storage.js, AppContext.jsx has no direct localStorage calls, and existing behavior remains unchanged.

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

評価

技術スタック
javascript
領域
frontend
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
76/100

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

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