feat(dashboard/redis): syntax-highlight json values and fix inspector display#17
Merged
Merged
Conversation
… display Redis Inspector で Hash の VALUE 列が画面右端で省略表示されていた問題を 修正し、JSON 値にシンタックスハイライトを追加。Redshift Inspector の パネル幅もレイアウト調整で広げる。 - redshift: dynamodb-workspace から redshift-workspace 専用クラスに分離し、 Clusters と Catalog の下段に Inspector をフル幅で配置。 - redis: グローバル <code> の white-space: nowrap / text-overflow: ellipsis をテーブルセル内 <code> で上書きし、長い値がセル内で折り返されるように。 - redis: redis-inspector / redis-inspector-section に min-width: 0 を追加 し、flex item の min-width: auto による table-layout: fixed 無効化を抑止。 - redis: jsonHighlight ユーティリティを追加し、Hash の VALUE が JSON の ときはダーク背景のコードブロックに色付き整形表示。String 値の Pretty モードでも同じハイライタを適用。 Vite ビルド成果物 (internal/dashboard/assets/react/) も更新。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Background
Redis Inspector の Hash 表示で長い JSON 値が
,"ses…"の形で省略され、データが確認できない状態だった。原因はグローバルcode要素に効いていたwhite-space: nowrap+text-overflow: ellipsisがテーブルセル内の<code>にも適用され、word-break: break-all等の上書きでは制御できていなかった点。あわせて、Redshift Inspector が DynamoDB 用の 3 列レイアウト(260〜360px の狭い 3 列目)を流用していたため、SQL エディタや結果テーブルが押し潰されていた。Changes
dynamodb-workspaceからredshift-workspace専用クラスに分離。Clusters と Catalog を上段、Inspector を下段にフル幅で配置。.redis-hash-table codeでグローバルcodeのnowrap/ellipsis/overflow:hiddenをnormal/clip/visibleで上書き。.redis-hash-tableにtable-layout: fixedと Field 列の幅指定を追加。.redis-inspector/.redis-inspector-sectionにmin-width: 0を追加し、flex item のmin-width: autoによるtable-layout: fixed無効化を抑止。jsonHighlightユーティリティ(依存追加なし、~60 行の正規表現ベース)を新規追加。Hash の VALUE が JSON ならダーク背景のコードブロックに色付き整形表示。String 値の Pretty モードでも同じハイライタを適用。重複していたtryFormatJSONを整理。Vite ビルド成果物 (
internal/dashboard/assets/react/) も同梱。Test plan
cd web/dashboard && npm run typecheck通過cd web/dashboard && npm run build成功(CSS +0.76KB / JS +0.87KB)go test ./internal/dashboard/...通過go test ./internal/services/redis/...通過go vet ./...通過devcloud upで起動して/dashboard/redisを開き、Hash キーの VALUE 列が折り返されて全文が見え、JSON が色付きで表示されることを確認/dashboard/redshiftで Inspector がフル幅で表示され、SQL エディタと結果テーブルが収まることを確認Risk
Low — フロントエンドのみの変更、API 互換性に影響なし、依存追加なし。