Skip to content

Commit 9d76cb1

Browse files
committed
Merge branch 'develop'
2 parents 46e033c + d62a62b commit 9d76cb1

38 files changed

Lines changed: 1240 additions & 287 deletions

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dotnet build --no-restore
1616

1717
# Tests use xunit.v3 via dotnet run (not dotnet test)
1818
dotnet run --project tests/Clet.UnitTests --no-build
19+
dotnet run --project tests/Clet.ConfigTests --no-build
1920
dotnet run --project tests/Clet.IntegrationTests --no-build
2021
dotnet run --project tests/Clet.SmokeTests --no-build
2122
```
@@ -61,6 +62,7 @@ Projects in this repo:
6162

6263
- **`src/Clet/`** — The CLI executable (net10.0). Depends on `Terminal.Gui` v2 (preview NuGet, currently `2.0.2-develop.24` — pin tracked in `src/Clet/Clet.csproj`, must be replaced with a release tag before v0.5 schema-lock per spec §8 risks). All abstractions are `internal` (not published until v2 plugin system). `BuiltInClets.RegisterAll` registers the shipped clets by hand; auto-discovery via a source generator was explored and dropped.
6364
- **`tests/Clet.UnitTests/`** — Registry, JSON schema, host pipeline (CommandLineRoot, OutputFormatter, ExitCodes, BuiltInClets) tests.
65+
- **`tests/Clet.ConfigTests/`** — Non-parallel assembly for all `ConfigurationManager`-touching tests (EditorSettings, FileAccessSettings CM round-trips). `xunit.runner.json` disables both assembly and collection parallelization. **Never enable CM in the other parallel test projects.**
6466
- **`tests/Clet.IntegrationTests/`** — In-process tests that init Terminal.Gui (`Application.Create()`, `app.Init("ansi")`).
6567
- **`tests/Clet.SmokeTests/`** — Process-level smoke tests (`Process.Start` against the built `Clet.dll`). The keystroke-driven cases land at v0.3 with TUIcast — see `specs/decisions.md` D-007.
6668

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Or, without `make`:
7070
dotnet restore
7171
dotnet build
7272
dotnet run --project tests/Clet.UnitTests
73+
dotnet run --project tests/Clet.ConfigTests
7374
dotnet run --project tests/Clet.IntegrationTests
7475
dotnet run --project tests/Clet.SmokeTests
7576
```
@@ -82,7 +83,8 @@ All green? Ship it.
8283
2. **Branch from `develop`**, not `main`. PRs target `develop`. Merging to `main` is a release.
8384
3. **Keep PRs small.** One thing per PR. If your PR touches the spec, the decisions log, *and* the code — good, that's the doc-update gate doing its job.
8485
4. **Tests are not optional.** New clet? Unit + integration tests. New CLI flag? CommandLineRoot tests. Bug fix? Regression test.
85-
5. **Read `CLAUDE.md`** before your first PR. It has the build commands, the doc-update gate checklist, and pointers to the spec and decisions log.
86+
5. **ConfigurationManager tests live only in `Clet.ConfigTests`.** Never call `ConfigurationManager.Enable/Load/Apply/Disable` or set `ConfigurationManager.AppName`/`RuntimeConfig` in the parallel test projects (`Clet.UnitTests`, `Clet.IntegrationTests`, `Clet.SmokeTests`, `Clet.UITests`). CM is process-global; `Clet.ConfigTests` disables all parallelization at the assembly level to guarantee deterministic discovery order.
87+
6. **Read `CLAUDE.md`** before your first PR. It has the build commands, the doc-update gate checklist, and pointers to the spec and decisions log.
8688

8789
## What we're looking for
8890

Clet.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<Solution>
22
<Project Path="src/Clet/Clet.csproj" />
3+
<Project Path="tests/Clet.ConfigTests/Clet.ConfigTests.csproj" />
34
<Project Path="tests/Clet.UnitTests/Clet.UnitTests.csproj" />
45
<Project Path="tests/Clet.IntegrationTests/Clet.IntegrationTests.csproj" />
56
<Project Path="tests/Clet.SmokeTests/Clet.SmokeTests.csproj" />

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<Copyright>Copyright (c) gui-cs and contributors</Copyright>
1414

1515
<!-- Pinned Terminal.Gui version. CI / release workflows can override via -p:TerminalGuiVersion=<x>. -->
16-
<TerminalGuiVersion Condition="'$(TerminalGuiVersion)' == ''">2.1.1-develop.98</TerminalGuiVersion>
16+
<TerminalGuiVersion Condition="'$(TerminalGuiVersion)' == ''">2.2.1</TerminalGuiVersion>
1717
<!-- Pinned Terminal.Gui.Editor version. CI / release workflows can override via -p:TerminalGuiEditorVersion=<x>. -->
18-
<TerminalGuiEditorVersion Condition="'$(TerminalGuiEditorVersion)' == ''">2.1.1-develop.*</TerminalGuiEditorVersion>
18+
<TerminalGuiEditorVersion Condition="'$(TerminalGuiEditorVersion)' == ''">2.2.1</TerminalGuiEditorVersion>
1919
</PropertyGroup>
2020

2121
</Project>

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ build-release: restore
6666

6767
test:
6868
dotnet run --project tests/Clet.UnitTests --no-build
69+
dotnet run --project tests/Clet.ConfigTests --no-build
6970
dotnet run --project tests/Clet.IntegrationTests --no-build
7071
dotnet run --project tests/Clet.SmokeTests --no-build
7172

src/Clet/Clets/Viewer/ConfigClet.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ void TryQuit ()
307307
/// <summary>Returns the path to <c>~/.tui/clet.config.json</c>.</summary>
308308
internal static string GetConfigPath ()
309309
{
310+
if (!OperatingSystem.IsWindows ()
311+
&& Environment.GetEnvironmentVariable ("HOME") is { Length: > 0 } homeOverride)
312+
{
313+
return Path.Combine (homeOverride, ".tui", ConfigFileName);
314+
}
315+
310316
string home = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
311317

312318
return Path.Combine (home, ".tui", ConfigFileName);

0 commit comments

Comments
 (0)