v0.12.0 d035193

workspace_tree_validator.go RawHistoryFolder

1// workspace_tree_validator.go - Simplified validator stub to keep API surface.
2package browser
3
4import "fmt"
5
6// TreeValidator previously performed extensive tree checks. The SafeWidget
7// removal rendered the implementation obsolete, so we keep a lightweight shim
8// until a new validator is written.
9type TreeValidator struct {
10	enabled bool
11}
12
13// NewTreeValidator returns a stub validator instance.
14func NewTreeValidator(enabled bool, _ bool) *TreeValidator {
15	return &TreeValidator{enabled: enabled}
16}
17
18// ValidateTree is a no-op that reports success unless validation is explicitly enabled.
19func (tv *TreeValidator) ValidateTree(_ *paneNode, _ string) error {
20	if tv == nil || !tv.enabled {
21		return nil
22	}
23	return fmt.Errorf("tree validation not implemented")
24}
25
26// SetDebugMode preserved for compatibility.
27func (tv *TreeValidator) SetDebugMode(_ bool) {}
28
29// Enable turns validation on (no functional impact in the stub).
30func (tv *TreeValidator) Enable() {
31	if tv != nil {
32		tv.enabled = true
33	}
34}
35
36// Disable turns validation off.
37func (tv *TreeValidator) Disable() {
38	if tv != nil {
39		tv.enabled = false
40	}
41}
42
43// GetValidationStats mimics the old diagnostic output.
44func (tv *TreeValidator) GetValidationStats() map[string]interface{} {
45	return map[string]interface{}{
46		"enabled": tv != nil && tv.enabled,
47	}
48}
49
50// Enabled reports current state (used by tests/instrumentation).
51func (tv *TreeValidator) Enabled() bool {
52	return tv != nil && tv.enabled
53}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close