refactor!: rename Titano to Chronos and move CI and releases to Gitea (#6)
CI / Build and test (push) Successful in 8m14s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 13m19s
CI / PostgreSQL 16 integration (push) Successful in 4m49s
CI / PostgreSQL 17 integration (push) Successful in 5m28s
CI / Docker image (push) Successful in 53s
Release / Server image (push) Failing after 10s

The owner renamed the product and moved the repository to the self-hosted
Gitea (https://gitea.encke-hake.ts.net/BalboSoft/Chronos) for more control,
and asked for Actions and a first automatic release with the server package
and the Windows exe (docs/requests/2026-10-23-chronos-gitea.md).

- Chronos everywhere: a byte-exact rename of contents and paths, then a
  per-language review of the forms the old name's ending had dictated.
- Gitea instead of GitHub: the update check, licence, issue and support
  links read ChronosReleasesUrl; the update check takes the highest stable
  version, offers a pre-release build its final release and reports a
  repository it cannot see as a failed check. EULA, security policy and
  Gitea issue forms live at the repository root.
- Gitea Actions for the Linux act_runner (.gitea/workflows): CI, release,
  nightly image and performance gates in the .NET SDK container with git
  checkout and the system SQLite. The release cross-compiles the Windows
  programs, checks their icon, version and DPI manifest, packs installers
  and zips, publishes the Gitea release and pushes the server image
  (REGISTRY_TOKEN). Windows-only tests run in an opt-in job on a Windows
  runner (WINDOWS_RUNNER).
- New Chronos.Tools commands: zip, gitea-release, postgres-ci (replaces the
  docker-exec script, which Gitea's service containers do not allow; the
  throw-away server runs without durability) and pe-check.
- Timed tests take their budget from TestTiming (CHRONOS_TEST_TIME_FACTOR,
  3 on the shared runner; the weekly performance gates keep theirs).

BREAKING CHANGE: programs, settings, data folders, file types, environment
variables and the Docker image use the new name; nothing is migrated from
Titano, which never had a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #6.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-23 12:45:18 +02:00
1 parent c99842cc86
commit f2b58522b9
1801 files changed
+11804 -10676

No files matched your search

@@ -0,0 +1,111 @@
using System.Xml.Linq;
namespace Chronos.Tools.Commands;
/// <summary>
/// BRIEF §20.3 / DESIGN §4: every actionable control carries a tooltip and no visible text is a literal.
/// Elements inside <c>ControlTemplate</c>s are template parts and exempt from the tooltip rule.
/// </summary>
internal sealed class XamlLintCommand : ICommand
{
private static readonly HashSet<string> Actionable = new(StringComparer.Ordinal)
{
"Button", "ToggleButton", "RepeatButton", "Slider", "ComboBox", "CheckBox", "RadioButton", "MenuItem",
"AutoSlider", "IconButton", "SplitButton",
};
private static readonly string[] TextAttributes = ["Content", "Text", "Header", "ToolTip", "Title", "Tag"];
public string Name => "xaml-lint";
public string Summary => "Check tooltips and literal text in all XAML under src/";
public Task<int> RunAsync(string[] args)
{
var root = Args.RepoRoot();
var problems = new List<string>();
var files = Directory.EnumerateFiles(Path.Combine(root, "src"), "*.xaml", SearchOption.AllDirectories)
.Where(f => !f.Contains($"{Path.DirectorySeparatorChar}obj{Path.DirectorySeparatorChar}", StringComparison.Ordinal)
&& !f.Contains($"{Path.DirectorySeparatorChar}bin{Path.DirectorySeparatorChar}", StringComparison.Ordinal))
.ToList();
var documents = files.Select(f => (File: f, Doc: XDocument.Load(f, LoadOptions.SetLineInfo))).ToList();
var valueTypes = ValueResourceTypes(documents.Select(d => d.Doc));
foreach (var (file, doc) in documents)
{
foreach (var el in doc.Descendants())
{
var line = ((System.Xml.IXmlLineInfo)el).LineNumber;
var where = $"{Path.GetRelativePath(root, file)}:{line}";
var name = el.Name.LocalName;
var inTemplate = el.Ancestors().Any(a => a.Name.LocalName is "ControlTemplate" or "Setter" or "Style");
if (Actionable.Contains(name) && !inTemplate && !HasToolTip(el) && !IsExempt(el))
problems.Add($"{where}: <{name}> has no ToolTip");
foreach (var attrName in TextAttributes)
{
var attr = el.Attribute(attrName);
if (attr is null) continue;
var v = attr.Value;
if (v.Length == 0 || v.StartsWith('{')) continue;
if (attrName == "Tag" || (attrName == "Content" && inTemplate)) continue;
if (v.Any(char.IsLetter))
problems.Add($"{where}: literal {attrName}=\"{v}\" on <{name}> (use {{l:Loc …}})");
}
foreach (var attr in el.Attributes())
{
if (ExpectedValueType(name, attr.Name.LocalName) is not { } expected || ResourceKey(attr.Value) is not { } key) continue;
if (valueTypes.TryGetValue(key, out var actual) && actual != expected)
problems.Add($"{where}: {name}.{attr.Name.LocalName} needs a {expected} but resource {key} is a {actual}");
}
// Literal element content such as <TextBlock>Hello</TextBlock> or <Run>Hi</Run>.
if (name is "TextBlock" or "Run" or "Label" or "Button" && !el.HasElements && el.Value.Any(char.IsLetter))
problems.Add($"{where}: literal text in <{name}>");
}
}
foreach (var p in problems) Console.Error.WriteLine(p);
Console.WriteLine($"xaml-lint: {files.Count} file(s), {problems.Count} problem(s)");
return Task.FromResult(problems.Count == 0 ? 0 : 1);
}
/// <summary>Keyed resources of the value types WPF cannot convert into each other at run time (parsing succeeds, loading fails).</summary>
private static Dictionary<string, string> ValueResourceTypes(IEnumerable<XDocument> documents)
{
var types = new Dictionary<string, string>(StringComparer.Ordinal);
foreach (var el in documents.SelectMany(d => d.Descendants()))
{
if (el.Name.LocalName is not ("Double" or "GridLength" or "Thickness" or "CornerRadius")) continue;
if (el.Attributes().FirstOrDefault(a => a.Name.LocalName == "Key") is { } key) types[key.Value] = el.Name.LocalName;
}
return types;
}
private static string? ExpectedValueType(string element, string attribute) => attribute switch
{
"Width" when element == "ColumnDefinition" => "GridLength",
"Height" when element == "RowDefinition" => "GridLength",
"Margin" or "Padding" or "BorderThickness" => "Thickness",
"CornerRadius" => "CornerRadius",
"Width" or "Height" or "MinWidth" or "MaxWidth" or "MinHeight" or "MaxHeight" or "FontSize" => "Double",
_ => null,
};
private static string? ResourceKey(string value)
{
var match = System.Text.RegularExpressions.Regex.Match(value, @"^\{(?:Static|Dynamic)Resource\s+(?:ResourceKey=)?([^\s}]+)\s*\}$");
return match.Success ? match.Groups[1].Value : null;
}
private static bool HasToolTip(XElement el) =>
el.Attribute("ToolTip") is not null
|| el.Elements().Any(c => c.Name.LocalName.EndsWith(".ToolTip", StringComparison.Ordinal))
|| el.Attributes().Any(a => a.Name.LocalName == "TipKey");
/// <summary>Opt-out for controls whose tooltip is applied by a style (marked explicitly in XAML).</summary>
private static bool IsExempt(XElement el) =>
el.Attributes().Any(a => a.Name.LocalName == "ToolTipFromStyle" && a.Value == "True");
}