Skip to content

Commit 9fc1f07

Browse files
stho32claude
andcommitted
[R0101] Restliche Wartungsvorschlaege abschliessen
- GetParticipants-Bug behoben (participant2 vor participant1) und repetitiven Teilnehmer-Code durch Schleifen ersetzt - .editorconfig fuer einheitlichen Code-Stil eingefuehrt - CHANGELOG.md aus Git-History erstellt - R0101 Wartung auf Erledigt gesetzt — alle 9 Vorschlaege umgesetzt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7690fc4 commit 9fc1f07

File tree

4 files changed

+161
-52
lines changed

4 files changed

+161
-52
lines changed

CHANGELOG.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/).
6+
7+
## [Unreleased]
8+
9+
### Added
10+
- Unit-Test-Projekte fuer BL und Infrastructure (40 Tests)
11+
- 8 Kern-Feature-Anforderungen dokumentiert (R0001-R0008)
12+
- Wartungsbericht R0101 mit Verbesserungsvorschlaegen
13+
- `.editorconfig` fuer einheitlichen Code-Stil
14+
15+
### Changed
16+
- SessionConfigurationFileHandler und SessionConfigurationFolderHandler von static auf Instanz-Klassen refactored (Testbarkeit)
17+
- Teilnehmer-Code in EnterNamesWindow durch Schleifen ersetzt (war 10x Copy-Paste)
18+
- GitHub Actions auf aktuelle Versionen aktualisiert (checkout@v4, setup-dotnet@v4, action-gh-release@v2)
19+
- Avalonia UI auf 11.3.13 aktualisiert (via NuGet-Update PR #27)
20+
21+
### Fixed
22+
- GetParticipants() Bug: participant2 wurde vor participant1 hinzugefuegt
23+
- Leerer catch-Block in StartForm durch Fehleranzeige ersetzt
24+
- Typo `activeParticipnat` -> `activeParticipant` korrigiert
25+
26+
### Removed
27+
- Ungenutztes VisualPairCoding.Interfaces-Projekt (IGithubAPIResponse — Ueberrest der entfernten Auto-Update-Funktion)
28+
- Ungenutzte Newtonsoft.Json-Abhaengigkeit (Code nutzt System.Text.Json)
29+
- Unused using `BitVector32` in EnterNamesWindow
30+
31+
## [v1.78] - 2023-09-17
32+
33+
### Fixed
34+
- Fix for recent sessions
35+
36+
## [v1.77] - 2023-09-10
37+
38+
### Fixed
39+
- NumericUpDown control appended `,0` — fixed formatting
40+
41+
## [v1.76] - 2023-05-28
42+
43+
### Added
44+
- Recent sessions menu
45+
- Total duration option for sessions
46+
47+
## [v1.75] - 2023-02-25
48+
49+
### Changed
50+
- Migrated from WinForms to Avalonia UI (cross-platform)
51+
- Build workflow creates Windows, Linux, and macOS releases
52+
53+
### Added
54+
- About dialog with version info
55+
- Session load/save functionality (.vpcsession files)
56+
- Command-line startup with config file
57+
- Skip current driver button
58+
- Randomize participants button
59+
60+
## [v1.74] - 2023-02-05
61+
62+
### Added
63+
- Full-screen animation when driver changes
64+
- Draggable chromeless session window
65+
- Application icon
66+
67+
## [0.0.1] - 2022-07-29
68+
69+
### Added
70+
- Initial release
71+
- Pair coding session timer with participant rotation
72+
- Up to 10 participants
73+
- Configurable turn duration
74+
- Always-on-top timer window
75+
- Recommended navigator display

Requirements/R0101-Wartung-2026-04-03.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: R0101
33
titel: "Repository-Wartung 2026-04-03"
44
typ: Wartung
5-
status: Offen
5+
status: Erledigt
66
erstellt: 2026-04-03
77
---
88

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Top-level EditorConfig
2+
root = true
3+
4+
# All files
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = crlf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
13+
# XML / XAML files
14+
[*.{xml,axaml,xaml,csproj,props,targets,sln}]
15+
indent_size = 2
16+
17+
# JSON files
18+
[*.json]
19+
indent_size = 2
20+
21+
# Markdown files
22+
[*.md]
23+
trim_trailing_whitespace = false
24+
25+
# C# files
26+
[*.cs]
27+
# Organize usings
28+
dotnet_sort_system_directives_first = true
29+
dotnet_separate_import_directive_groups = false
30+
31+
# this. preferences
32+
dotnet_style_qualification_for_field = false:suggestion
33+
dotnet_style_qualification_for_property = false:suggestion
34+
dotnet_style_qualification_for_method = false:suggestion
35+
dotnet_style_qualification_for_event = false:suggestion
36+
37+
# Language keywords vs BCL types preferences
38+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
39+
dotnet_style_predefined_type_for_member_access = true:suggestion
40+
41+
# var preferences
42+
csharp_style_var_for_built_in_types = true:suggestion
43+
csharp_style_var_when_type_is_apparent = true:suggestion
44+
csharp_style_var_elsewhere = true:suggestion
45+
46+
# Expression-level preferences
47+
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
48+
csharp_style_expression_bodied_constructors = false:suggestion
49+
csharp_style_expression_bodied_properties = true:suggestion
50+
51+
# Namespace preferences
52+
csharp_style_namespace_declarations = file_scoped:suggestion
53+
54+
# New line preferences
55+
csharp_new_line_before_open_brace = all
56+
csharp_new_line_before_else = true
57+
csharp_new_line_before_catch = true
58+
csharp_new_line_before_finally = true

Source/VisualPairCoding/VisualPairCoding.AvaloniaUI/EnterNamesWindow.axaml.cs

Lines changed: 27 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -186,56 +186,40 @@ public void LoadSessionIntoGui(SessionConfiguration session)
186186
{
187187
participant1.Focus();
188188

189-
for (var i = 1; i <= 10; i++)
189+
for (var i = 1; i <= MaxParticipants; i++)
190190
{
191-
var control = this.FindControl<TextBox>("participant" + i);
192-
191+
var control = GetParticipantTextBox(i);
193192
if (control != null)
194193
{
195-
control.Text = "";
194+
control.Text = (i - 1 < session.Participants.Length)
195+
? session.Participants[i - 1].Trim()
196+
: "";
196197
}
197198
}
198199

199-
for (var i = 1; i <= session.Participants.Length; i++)
200-
{
201-
var control = this.FindControl<TextBox>("participant" + i);
200+
minutesPerTurn.Value = session.SessionLength;
201+
}
202202

203-
if (control != null)
204-
{
205-
control.Text = session.Participants[i - 1].Trim();
206-
}
207-
}
203+
private const int MaxParticipants = 10;
208204

209-
minutesPerTurn.Value = session.SessionLength;
205+
private TextBox? GetParticipantTextBox(int index)
206+
{
207+
return this.FindControl<TextBox>("participant" + index);
210208
}
211209

212210
private void RandomizeParticipants(object? sender, RoutedEventArgs args)
213211
{
214212
var participants = GetParticipants();
215-
216-
participant1.Text = "";
217-
participant2.Text = "";
218-
participant3.Text = "";
219-
participant4.Text = "";
220-
participant5.Text = "";
221-
participant6.Text = "";
222-
participant7.Text = "";
223-
participant8.Text = "";
224-
participant9.Text = "";
225-
participant10.Text = "";
226-
227213
Shuffle(participants);
228214

229-
if (participants.Length > 0) participant1.Text = participants[0];
230-
if (participants.Length > 1) participant2.Text = participants[1];
231-
if (participants.Length > 2) participant3.Text = participants[2];
232-
if (participants.Length > 3) participant4.Text = participants[3];
233-
if (participants.Length > 4) participant5.Text = participants[4];
234-
if (participants.Length > 5) participant6.Text = participants[5];
235-
if (participants.Length > 6) participant7.Text = participants[6];
236-
if (participants.Length > 7) participant8.Text = participants[7];
237-
if (participants.Length > 8) participant9.Text = participants[8];
238-
if (participants.Length > 9) participant10.Text = participants[9];
215+
for (var i = 1; i <= MaxParticipants; i++)
216+
{
217+
var control = GetParticipantTextBox(i);
218+
if (control != null)
219+
{
220+
control.Text = (i - 1 < participants.Length) ? participants[i - 1] : "";
221+
}
222+
}
239223
}
240224

241225
private static readonly Random random = new();
@@ -251,25 +235,17 @@ public static void Shuffle<T>(IList<T> list)
251235
}
252236
}
253237

254-
private static void AddParticipantIfAvailable(string name, List<string> participants)
255-
{
256-
if (!string.IsNullOrWhiteSpace(name))
257-
participants.Add(name);
258-
}
259-
260238
private string[] GetParticipants()
261239
{
262240
var participants = new List<string>();
263-
AddParticipantIfAvailable(participant2.Text ?? string.Empty, participants);
264-
AddParticipantIfAvailable(participant1.Text ?? string.Empty, participants);
265-
AddParticipantIfAvailable(participant3.Text ?? string.Empty, participants);
266-
AddParticipantIfAvailable(participant4.Text ?? string.Empty, participants);
267-
AddParticipantIfAvailable(participant5.Text ?? string.Empty, participants);
268-
AddParticipantIfAvailable(participant6.Text ?? string.Empty, participants);
269-
AddParticipantIfAvailable(participant7.Text ?? string.Empty, participants);
270-
AddParticipantIfAvailable(participant8.Text ?? string.Empty, participants);
271-
AddParticipantIfAvailable(participant9.Text ?? string.Empty, participants);
272-
AddParticipantIfAvailable(participant10.Text ?? string.Empty, participants);
241+
242+
for (var i = 1; i <= MaxParticipants; i++)
243+
{
244+
var control = GetParticipantTextBox(i);
245+
var text = control?.Text ?? string.Empty;
246+
if (!string.IsNullOrWhiteSpace(text))
247+
participants.Add(text);
248+
}
273249

274250
return participants.ToArray();
275251
}

0 commit comments

Comments
 (0)