Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Allow configuring default sort column for the processviewer widget via meta key

オープン 初心者向け
#3,284 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
typescript
領域
frontend

調査の方向性

frontend/app/view/processviewer/processviewer.tsx から始め、特に SortCol 型と、32 行目および 113-114 行目の atom のデフォルト初期化を確認してください。processviewer ウィジェットで block meta がどのように読み取られるかを追跡し、要求された 2 つの meta キーが初期ソートを設定する一方で、手動のクリックによる再ソートの動作は変わらないことを確認してください。

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

説明

Summary

The processviewer widget's default sort is hardcoded to CPU descending. There's no way to configure a different default — every fresh processviewer block opens sorted by CPU, and the user has to manually click another column header (e.g. Memory) every time. The sort preference doesn't persist across block recreations either, since it's stored only in a runtime atom rather than block meta.

For users who primarily care about a non-CPU column (memory hogs being the obvious case), CPU is a poor default to be locked into.

Current behavior

In frontend/app/view/processviewer/processviewer.tsx:113-114:

this.sortByAtom = jotai.atom<SortCol>("cpu");
this.sortDescAtom = jotai.atom<boolean>(true);

Hardcoded. The SortCol type at line 32 already enumerates all valid columns:

type SortCol = "pid" | "command" | "user" | "cpu" | "mem" | "status" | "threads";

On Windows the visible columns are PID / Command / CPU% / Memory (status, user, threads are hidden via hideOnPlatform), so the meaningful defaults a Windows user would want are one of those four. Other platforms get all seven.

Request

Please add meta keys to control the initial sort, e.g.:

  • processviewer:sortby — one of the SortCol values ("pid" | "command" | "user" | "cpu" | "mem" | "status" | "threads"), default "cpu"
  • processviewer:sortdesc — bool, default true

So a user can put this in their widgets.json to override the default processviewer widget to sort by memory:

"defwidget@processviewer": {
    "display:order": -1,
    "icon": "list-tree",
    "label": "processes",
    "blockdef": {
        "meta": {
            "view": "processviewer",
            "processviewer:sortby": "mem",
            "processviewer:sortdesc": true
        }
    }
}

Manual click-to-resort behavior would still work as today; the meta keys only control the initial state of the atoms.

主要言語
Go
スター
22.3k
フォーク
1.1k
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wavetermdev/waveterm のほかの issue

wavetermdev/waveterm の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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