Opt-in study logging of extension interactions

未關閉
#121 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #149 來自 @rcosta358 —— 已關閉,未合併

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript, vscode

研究方向

Start with client/package.json and the existing paths in client/src/services/events.ts, client/src/lsp/client.ts, client/src/services/diagnostics.ts, provider.ts, and client/src/webview/script.ts. Trace how extension activation, deactivation, configuration changes, and messages are handled before defining the logger integration. Done means opt-in JSONL logging covers the listed events without source contents, remains inactive by default, and is documented in README or CONTRIBUTING.

由索引模型根據 Issue 內容生成。

描述

enhancement

Tracking issue for the study side: CatarinaGamboa/building-examples-liquidjava#1

Goal

Add an opt-in study logger that records how participants use the extension (views, interactions, verification results, time per file). It writes the events to a local JSONL file in the workspace. It is off by default and never runs for normal users.

Settings

Add to client/package.json → contributes.configuration:

setting type default purpose
liquidjava.study.enabled boolean false turn logging on (set by the study repo's .vscode/settings.json)
liquidjava.study.participantId string "" included in every event
liquidjava.study.logPath string .liquidjava/study-log.jsonl relative to the workspace root

(Existing settings use the liquidJavaServer. prefix, so we should decide on one naming scheme.)

Proposed design

  • New client/src/services/study-log.ts:
    • log(event: string, data?: object) appends { t, pid, session, event, ...data } as one line
    • no-op when disabled; listens to onDidChangeConfiguration so it can be switched on and off
    • buffered async writes, flushed on deactivate
    • a per-launch session id, so separate VS Code sessions can be told apart
  • Command liquidjava.study.revealLog: opens the log file (for transparency, and to help participants hand it in)

Events

Editor / timing (in client/src/services/events.ts, which already listens to onDidChangeActiveTextEditor / onDidSaveTextDocument)

  • file_focused / file_blurred (active editor changes)
  • file_saved, file_edited (debounced, with a count and no content)
  • window_focus / window_blur via vscode.window.onDidChangeWindowState

Verification (client/src/lsp/client.ts, client/src/services/diagnostics.ts)

  • verify_started / verify_finished (trigger, duration)
  • diagnostic_shown / diagnostic_resolved (file, line, kind: refinement / state / …, plus a stable key so the same error can be matched across runs)

Webview (client/src/webview/script.ts → postMessage({ type: 'log', ... }) → handled in provider.ts, which already forwards messages through onDidReceiveMessage)

  • view_visible / view_hidden
  • tab_selected: diagnostics / context / fsm
  • section_toggled: counterexample, VC changes, VC implications, hint, context variables / ghosts / aliases
  • diagnostic_reveal (the existing openFile message), highlight
  • clipboard_copy

Other

  • hover_shown (services/hover.ts), codelens_clicked (services/codelens.ts)
  • command_run for liquidjava.* commands
  • explain_requested / explain_shown / explain_dismissed (model id, latency, response), once #113 lands

Privacy

  • Log file names, lines and error kinds, but not source code (optional code snapshots are an open question in the study issue).
  • Nothing leaves the machine: participants hand in the file themselves via git.
  • Don't use the VS Code telemetry API. It follows the user's global telemetry setting and would send data elsewhere.

Acceptance criteria

  • No file is created and no overhead is added when liquidjava.study.enabled is false
  • Opening the study repo with the settings file produces a valid JSONL log
  • From the log alone, we can compute time-focused and time-to-fix per exercise file
  • The events listed above are covered; the schema is documented in the README / CONTRIBUTING
主要語言
TypeScript
星號
6
分支
1
平均合併
14 小時 6 分鐘
30 天內合併 PR
32

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

liquid-java/vscode-liquidjava 的其他 Issue

查看 liquid-java/vscode-liquidjava 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。