Commit graph

2,824 commits

Author SHA1 Message Date
2c672b003a publish postit settings 2026-06-20 18:46:05 +01:00
b2a35b60ce petite factorisation 2026-06-20 18:43:01 +01:00
fd129f19f5 README: mark appsettings-org.Development.json as gitignored
The previous commit's table incorrectly stated that
appsettings-org.Development.json is committed; it is in fact
matched by .gitignore (appsettings-*.*.json), so each developer
generates their own from the template documented here. Fix the
table and clarify the role.

The localhoist typo that lived in the previously-shown blob is
not versioned, so it does not propagate via git.
2026-06-20 18:20:38 +01:00
2768552a2d README: document the appsettings-org.json deployment cycle
The Yavsc.Org service reads appsettings-org.json at runtime, but the
contrib/Makefile renames that file to appsettings-org-dist.json right
before deploying to $(BASEAPPDIR), so first-time operators have to
copy the dist variant back to appsettings-org.json on the server and
fill in their actual values. None of that was documented; this commit
adds a Fichiers de configuration d'Yavsc.Org section under Paramétrage.

The section also notes that Site.ExternalUrl is now consumed by the
IdentityServer EF seed (added in the previous PostIt PKCE commit) to
authorize a RedirectUri for the 'postit' OIDC client, so PostIt can
be embedded in a Yavsc.Org web page without redirect_uri mismatch.

Side note: the appsettings-org.Development.json template points at
'https://localhoist:5001' which looks like a typo for 'localhost'.
Flagged in the README so it doesn't get copy-pasted into a new
environment as-is.
2026-06-20 18:16:36 +01:00
28b63ce70d more accurate 2026-06-20 18:06:29 +01:00
7a0944d0f5 PostIt.Desktop: wire the loopback browser, parameterise PostIt RedirectUris
The previous commit set Platform.CreateBrowser to null on the desktop
side, so LoginAsync would still fail with 'No browser is available'.
Close that loop with an explicit desktop bootstrap.

PostIt.Desktop/PlatformBootstrap.cs mirrors the Android side: it
populates Platform.DefaultRedirectUri and Platform.CreateBrowser
once at startup. Program.Main calls EnsureInitialized before
BuildAvaloniaApp so the LoginPageViewModel sees a working browser
before any login attempt.

The Yavsc.Org seed now reads Site:ExternalUrl from configuration so
the RedirectUri list for the PostIt client follows the same setting
as the rest of the application (same value used in
Administration/ClientController, AccountController, etc.). Without
this, an embedded 'launch PostIt from a Yavsc.Org page' scenario
would be rejected by IdentityServer (redirect_uri mismatch).

BuildPostItRedirectUris is a small helper that yields the constant
PostItRedirectUris (loopback + Android custom scheme) followed by
Site:ExternalUrl when set. Both SeedNewPostItClient (fresh db) and
MigratePostItClientToPublic (existing db) consume it. The legacy
cleanup block (which used to remove https://yavsc.pschneider.fr/
and yavsc://callback) is dropped: Site:ExternalUrl is now the
canonical way to authorise that path and may legitimately equal
that value.
2026-06-20 17:49:53 +01:00
c172d1cf9e PostIt.Android: drive the PKCE flow through Chrome Custom Tabs
The earlier commit removed the client_secret and wired
MainActivity.OnNewIntent to AndroidOidcCallbackSink, but
IdentityModel.OidcClient.LoginAsync still had no IBrowser to drive
the user-agent half of the flow. Without it, the desktop / browser
projects continue to fail at login with 'No browser is available'.

Android now plugs in Chrome Custom Tabs:

  * PostIt.Android/Services/AndroidSystemBrowser.cs implements
    IBrowser.InvokeAsync using CustomTabsIntent.LaunchUrl and waits
    for MainActivity.AndroidOidcCallbackSink to deliver the deep-link
    Intent (android://postit-signin?code=...&state=...).
  * PostIt/Services/Platform.cs is a tiny static indirection the
    shared library uses to ask the running platform for an
    IBrowser and the appropriate default RedirectUri, without
    referencing any UI framework from the shared assembly.
  * LoginPageViewModel reads Platform.DefaultRedirectUri and
    Platform.CreateBrowser().Invoke() before calling LoginAsync.
  * PostIt.Android/PlatformBootstrap.cs wires the Android side at
    startup, and MainActivity.OnCreate calls EnsureInitialized().
  * Xamarin.AndroidX.Browser 1.8.0 added to the central package
    versions so CustomTabsIntent resolves.
2026-06-20 17:26:13 +01:00
512a0ef06f PostIt: switch OIDC client from confidential (client_secret) to public (PKCE/JWT)
PostIt is a desktop/mobile app talking to Yavsc.Org
(https://yavsc.pschneider.fr) as an OIDC identity provider. The
previous grant used the client_credentials flow with a client_secret
embedded in postit-settings.json: this was both insecure (secret
travels with the binary) and inappropriate for an interactive app
(token had no user identity, so the API could not scope or audit).

The new flow is Authorization Code + PKCE:

  * PostIt client (Settings/AuthenticationSettings.cs): the
    ClientSecret property is removed; GetOidcClientOptions now drops
    the secret and accepts an optional IBrowser supplied per-platform.
  * Settings.cs: new AndroidRedirectUri constant ('android://postit-signin')
    that the Android app uses; RedirectUri is no longer hard-coded in
    MainViewModel.
  * MainViewModel.cs: the manual discovery + client_credentials POST is
    replaced with OidcClient.LoginAsync (Authorization Code + PKCE).
  * Settings sample: Authority points at the real Yavsc.Org OP, not at
    a non-existent Keycloak-style realm path.
  * Yavsc.Org/Extensions/HostingExtensions.cs: the 'postit' client seed
    is now idempotent (MigratePostItClientToPublic) and detects
    legacy state on existing ConfigurationDb rows - flips
    RequireClientSecret=false, RequirePkce=true, drops any ClientSecret
    row, and replaces the legacy RedirectUris
    (https://yavsc.pschneider.fr/, yavsc://callback) with the current
    set (http://127.0.0.1:7890/, android://postit-signin).

PostIt.Android:

  * MainActivity: explicit Name attribute so the activity alias can
    target a stable component; LaunchMode.SingleTask so the existing
    instance receives the deep-link Intent; OnNewIntent forwards the
    callback URI through AndroidOidcCallbackSink.
  * AndroidManifest.xml: activity-alias PostIt.Android.OidcCallbackActivity
    exposing scheme=android host=postit-signin to Android, so the OP
    redirect lands back in the running PostIt instance.

The IdentityModel.OidcClient.Browser.SystemBrowser package and a
thin AndroidSystemBrowser implementation are added in a follow-up so
OidcClient.LoginAsync can actually drive Chrome Custom Tabs and
consume AndroidOidcCallbackSink.
2026-06-20 17:16:07 +01:00
2fd799c09f refactoring the login 2026-06-20 15:01:03 +01:00
66c48329cc Broken action 2026-06-19 23:12:17 +01:00
86c268eebd deploying the blogs 2026-06-19 23:09:43 +01:00
4398715004 reinstall fixes and reorg 2026-06-19 21:13:17 +01:00
196106c048 Test reorg 2026-06-19 20:07:05 +01:00
62afee53e1 refactoring 2026-06-19 19:59:15 +01:00
9fc719aa4d more crucial config from the service setup 2026-06-19 19:50:04 +01:00
bd75e73b74 Drop Selenium-based UI tests
Selenium-driven UI tests don't run reliably on Linux; the UI tests in
FirstUIStript.cs were flaky and time-consuming without catching real
regressions. The maintained UI going forward is PostIt, which is tested
via its own PostIt.Tests project.

Removed:
- src/Yavsc.Org.Tests/FirstUIStript.cs (the Selenium-based FirstScript class)
- Selenium.WebDriver PackageReference from Yavsc.Org.Tests.csproj
- Selenium.WebDriver version from src/Yavsc.Org.Tests/Directory.Packages.props

WebServerFixture, BaseTestContext, and the integration tests that depend
on them (Remoting, Services, EMailling, etc.) are unaffected.
2026-06-19 18:57:21 +01:00
002f8cc7e4 Split Directory.Packages.props: shared versions in root, per-product in src/
Move product-local package versions out of the root Directory.Packages.props
into per-product props files under src/<Product>/. The root file now only
contains versions for packages declared by two or more top-level products,
which is the actual shared set.

Each per-product Directory.Packages.props imports the root via
GetPathOfFileAbove so that the shared versions are inherited; this is
necessary because the .NET SDK picks the closest Directory.Packages.props
in the hierarchy and does not merge multiple ones.

Per-product file contents:
- src/cli/                    Microsoft.AspNetCore.Razor.Language,
                              Microsoft.Extensions.{CommandLineUtils,Configuration,Hosting}
- src/PostIt/                 Avalonia* and CommunityToolkit.Mvvm
- src/PostIt.Tests/           Avalonia.Headless{,XUnit}
- src/Yavsc.Org/              AsciiDocSharp*, Google.Apis.Compute.v1,
                              HigginsSoft.IdentityServer8.AspNetIdentity,
                              IdentityServer8.EntityFramework.Storage,
                              IdentityServer8.Security, IdentityServer8.Storage,
                              Microsoft.AspNetCore.Antiforgery, Authentication.Google,
                              Diagnostics.EntityFrameworkCore, Mvc.NewtonsoftJson,
                              SignalR, EntityFrameworkCore.Tools, Swashbuckle,
                              System.Security.Cryptography.Pkcs, YamlDotNet
- src/Yavsc.Org.Tests/        Microsoft.AspNetCore.Hosting,
                              Extensions.Caching.Memory, Options,
                              Options.ConfigurationExtensions,
                              Selenium.WebDriver, xunit.v3.{common,extensibility.core}
- src/Yavsc.Server/           Anthropic.SDK, Google.Apis.Calendar.v3,
                              Magick.NET-Q8-AnyCPU, MailKit, MimeKit,
                              Microsoft.AspNetCore.Http.Features, StaticFiles,
                              EntityFrameworkCore.SqlServer,
                              Npgsql.EntityFrameworkCore.PostgreSQL,
                              PayPalMerchantSDK, pazof.rules, RazorEngine.NetCore
- src/Yavsc.Web/              IdentityModel.AspNetCore

No per-product file is created for Yavsc.Api, Yavsc.Blogs, Yavsc.Abstract,
or templateWeb: Api and Blogs only declare the shared JwtBearer, Abstract
and templateWeb declare no package references at all.

Also includes a minor cosmetic update to FirstUIStript.cs (Firefox -> Chrome
driver, dedent, comment header). Tests previously failing on DataProtection
keyset / SMTP were unrelated environment issues (resolved by fixing the
SMTP password locally).
2026-06-19 18:51:18 +01:00
22b397ce7e Relocate test project: test/yavscTests -> src/Yavsc.Org.Tests
Move the integration test project from the top-level test/ directory into
src/ alongside the projects it tests. Rename the project (and folder) to
Yavsc.Org.Tests to match .NET conventions and reflect that it tests the
Org runtime primarily.

Path changes:
- test/yavscTests/yavscTests.csproj -> src/Yavsc.Org.Tests/Yavsc.Org.Tests.csproj
- All .cs / .json / .resx files moved to their new location
- PostItViewModelTests moved out to the dedicated src/PostIt.Tests project
  (it was unrelated to Org testing)

Build adjustments:
- <ProjectReference> paths shortened (..\..\src\X -> ..\X)
- PostIt project reference removed (covered by its own test project)
- <OutputType>exe added (required by xunit.v3)
- xunit.v3.common and xunit.v3.extensibility.core added to package versions

Solution + sln:
- yavsc.sln Project Name updated to 'Yavsc.Org.Tests' and path updated
- GUID preserved so existing build configs stay valid

Static web assets:
- The CopyStaticWebAssetsManifest target was hard-coding the destination
  filename to 'testhost.staticwebassets.endpoints.json', which worked
  when the assembly was named 'yavscTests'. Now that the assembly name
  is 'Yavsc.Org.Tests', ASP.NET Core's MapStaticAssets() looks for
  'Yavsc.Org.Tests.staticwebassets.endpoints.json' (entry-assembly-based
  resolution). Use $(MSBuildProjectName) so the copy target stays
  correct under any future rename.
2026-06-19 17:52:54 +01:00
ad19ccbcfa PostIt testing setup 2026-06-19 16:55:42 +01:00
148f333b36 do not override appsettings-*.*.json 2026-06-19 16:18:39 +01:00
197f9f90bb a banner 2026-06-19 13:46:17 +01:00
dcf2a93ad0 Split Site:Audience into Site:ExternalUrl + Site:CorsAllowedOrigins
The Site:Audience setting was conflating two distinct concepts: an OAuth
JWT audience (a single resource identifier) and a CORS allow-list (an
array of origins). Collapsing them caused several latent bugs:
- OAuth/JWT validation expected a single string while CORS WithOrigins
  accepts an array.
- Password-reset callback URLs and OAuth client RedirectUri/Origin were
  being built from what was meant to be an audience identifier, not a
  base URL.
- Yavsc.Org's main CORS policy was hardcoded to '*', with no way to
  restrict it without code changes.

Changes:
- SiteSettings.Audience (string) replaced with CorsAllowedOrigins
  (IList<string>).
- OAuth JWT Authority still reads Site:Authority; Audience now reads
  Site:ExternalUrl (Org only; Api/Blogs use ValidateAudience=false).
- MailSender and AccountController build reset-callback URLs from
  Site:ExternalUrl.
- ClientController uses Site:ExternalUrl for OAuth RedirectUri/Origin
  defaults on newly created clients.
- Yavsc.Api and Yavsc.Blogs now read CORS origins from
  Site:CorsAllowedOrigins instead of hardcoded URLs.

Add shared AddYavscCors / AddYavscJwtBearer extension methods in
Yavsc.Server/Helpers/ServiceExtensions.cs to enforce a single
configuration contract across all runtime services (Api, Blogs, Org).
Fails closed when CorsAllowedOrigins is empty; fails fast at startup
when Site:Authority is missing.

Remove obsolete ConfigurationHelpers.GetAudience (no remaining callers).

Local appsettings-*.json files (which carry deployment-specific values
and are gitignored) must be updated to add Site:CorsAllowedOrigins.
2026-06-19 13:15:21 +01:00
b72fff9034 cleanup 2026-06-19 02:33:34 +01:00
508c74f3e4 cleanup 2026-06-19 02:17:07 +01:00
92461d5f7b make reinstall failed 2026-06-19 02:15:27 +01:00
37ca66c636 Merge pull request #63 from pazof/dependabot/npm_and_yarn/src/Yavsc.Org/wwwroot/lib/bootstrap/npm_and_yarn-f774270336
Bump the npm_and_yarn group across 4 directories with 24 updates
2026-06-19 01:36:58 +01:00
19cf073677 Regenerate the secret 2026-06-19 01:36:08 +01:00
3508f0a55d tests OK 2026-06-18 21:43:01 +01:00
2615b4e86b naming 2026-06-18 21:16:41 +01:00
dependabot[bot]
ed50a3dd08 Bump the npm_and_yarn group across 4 directories with 24 updates
Bumps the npm_and_yarn group with 1 update in the /src/Yavsc.Org/wwwroot/lib/bootstrap directory: [vnu-jar](https://github.com/validator/validator).
Bumps the npm_and_yarn group with 1 update in the /src/Yavsc.Org/wwwroot/lib/jquery-ui directory: [browserstack-local](https://github.com/browserstack/browserstack-local-nodejs).
Bumps the npm_and_yarn group with 17 updates in the /src/Yavsc.Web/wwwroot/lib/bootstrap directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.27.1` | `7.29.6` |
| [postcss](https://github.com/postcss/postcss) | `8.5.3` | `8.5.15` |
| [rollup](https://github.com/rollup/rollup) | `4.40.1` | `4.62.0` |
| [vnu-jar](https://github.com/validator/validator) | `24.10.17` | `26.2.1` |
| [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro) | `5.7.10` | `6.4.8` |
| [@babel/plugin-transform-modules-systemjs](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-modules-systemjs) | `7.27.1` | `7.29.7` |
| [fast-uri](https://github.com/fastify/fast-uri) | `3.0.6` | `3.1.2` |
| [flatted](https://github.com/WebReflection/flatted) | `3.3.3` | `3.4.2` |
| [follow-redirects](https://github.com/follow-redirects/follow-redirects) | `1.15.9` | `1.16.0` |
| [form-data](https://github.com/form-data/form-data) | `4.0.2` | `4.0.6` |
| [immutable](https://github.com/immutable-js/immutable-js) | `4.3.7` | `5.1.6` |
| [lodash](https://github.com/lodash/lodash) | `4.17.21` | `4.18.1` |
| [mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast) | `13.2.0` | `13.2.1` |
| [preact](https://github.com/preactjs/preact) | `10.26.5` | `10.29.2` |
| [qs](https://github.com/ljharb/qs) | `6.13.0` | `6.15.2` |
| [shell-quote](https://github.com/ljharb/shell-quote) | `1.8.2` | `1.8.4` |
| [tmp](https://github.com/raszi/node-tmp) | `0.2.3` | `0.2.7` |

Bumps the npm_and_yarn group with 2 updates in the /src/Yavsc.Web/wwwroot/lib/jquery-validation-unobtrusive directory: [minimatch](https://github.com/isaacs/minimatch) and [lodash](https://github.com/lodash/lodash).


Updates `vnu-jar` from 23.4.11 to 26.2.1
- [Release notes](https://github.com/validator/validator/releases)
- [Commits](https://github.com/validator/validator/commits)

Updates `browserstack-local` from 1.5.5 to 1.5.9
- [Release notes](https://github.com/browserstack/browserstack-local-nodejs/releases)
- [Commits](https://github.com/browserstack/browserstack-local-nodejs/compare/v1.5.5...v1.5.9)

Updates `@babel/core` from 7.27.1 to 7.29.6
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.6/packages/babel-core)

Updates `postcss` from 8.5.3 to 8.5.15
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.3...8.5.15)

Updates `rollup` from 4.40.1 to 4.62.0
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.40.1...v4.62.0)

Updates `vnu-jar` from 24.10.17 to 26.2.1
- [Release notes](https://github.com/validator/validator/releases)
- [Commits](https://github.com/validator/validator/commits)

Updates `astro` from 5.7.10 to 6.4.8
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/astro@6.4.8/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@6.4.8/packages/astro)

Updates `js-yaml` from 4.1.0 to 4.2.0
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/commits)

Updates `@babel/plugin-transform-modules-systemjs` from 7.27.1 to 7.29.7
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-plugin-transform-modules-systemjs)

Updates `defu` from 6.1.4 to 6.1.7
- [Release notes](https://github.com/unjs/defu/releases)
- [Changelog](https://github.com/unjs/defu/blob/main/CHANGELOG.md)
- [Commits](https://github.com/unjs/defu/compare/v6.1.4...v6.1.7)

Updates `devalue` from 5.1.1 to 5.8.1
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.1.1...v5.8.1)

Updates `fast-uri` from 3.0.6 to 3.1.2
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.0.6...v3.1.2)

Updates `flatted` from 3.3.3 to 3.4.2
- [Commits](https://github.com/WebReflection/flatted/compare/v3.3.3...v3.4.2)

Updates `follow-redirects` from 1.15.9 to 1.16.0
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.9...v1.16.0)

Updates `form-data` from 4.0.2 to 4.0.6
- [Release notes](https://github.com/form-data/form-data/releases)
- [Changelog](https://github.com/form-data/form-data/blob/master/CHANGELOG.md)
- [Commits](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.6)

Updates `h3` from 1.15.3 to 1.15.11
- [Release notes](https://github.com/h3js/h3/releases)
- [Changelog](https://github.com/h3js/h3/blob/v1.15.11/CHANGELOG.md)
- [Commits](https://github.com/h3js/h3/compare/v1.15.3...v1.15.11)

Updates `immutable` from 4.3.7 to 5.1.6
- [Release notes](https://github.com/immutable-js/immutable-js/releases)
- [Changelog](https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/immutable-js/immutable-js/compare/v4.3.7...v5.1.6)

Updates `lodash` from 4.17.21 to 4.18.1
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.18.1)

Updates `mdast-util-to-hast` from 13.2.0 to 13.2.1
- [Release notes](https://github.com/syntax-tree/mdast-util-to-hast/releases)
- [Commits](https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1)

Updates `preact` from 10.26.5 to 10.29.2
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.26.5...10.29.2)

Updates `qs` from 6.13.0 to 6.15.2
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.13.0...v6.15.2)

Updates `shell-quote` from 1.8.2 to 1.8.4
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/v1.8.2...v1.8.4)

Updates `tmp` from 0.2.3 to 0.2.7
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.7)

Updates `vite` from 6.3.4 to 7.3.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v7.3.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.3.5/packages/vite)

Updates `minimatch` from 5.1.0 to 5.1.8
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v5.1.0...v5.1.8)

Updates `lodash` from 4.17.21 to 4.18.1
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.18.1)

---
updated-dependencies:
- dependency-name: vnu-jar
  dependency-version: 26.2.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: browserstack-local
  dependency-version: 1.5.9
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@babel/core"
  dependency-version: 7.29.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: postcss
  dependency-version: 8.5.15
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: rollup
  dependency-version: 4.62.0
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: vnu-jar
  dependency-version: 26.2.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: astro
  dependency-version: 6.4.8
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@babel/plugin-transform-modules-systemjs"
  dependency-version: 7.29.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: defu
  dependency-version: 6.1.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: devalue
  dependency-version: 5.8.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: form-data
  dependency-version: 4.0.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: h3
  dependency-version: 1.15.11
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: immutable
  dependency-version: 5.1.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: mdast-util-to-hast
  dependency-version: 13.2.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: preact
  dependency-version: 10.29.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: qs
  dependency-version: 6.15.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: shell-quote
  dependency-version: 1.8.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: tmp
  dependency-version: 0.2.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: vite
  dependency-version: 7.3.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimatch
  dependency-version: 5.1.8
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-18 01:26:31 +00:00
94fb98eff6 doc, doc and doc. 2026-06-18 02:18:49 +01:00
c1f4d19975 fices the UI 2026-06-15 02:55:22 +01:00
4bfc28a369 Test using "make test" 2026-06-15 00:46:50 +01:00
5c6d6ee687 refactoring 2026-06-15 00:33:38 +01:00
aabbbc1fea use the helper 2026-06-15 00:11:48 +01:00
69e81b9fd4 Giving up at UI testing 2026-06-15 00:00:39 +01:00
cba18df870 Fixes the css 2026-06-14 23:04:24 +01:00
348e22f1c9 build 2026-06-14 20:59:24 +01:00
e137c3e2ff Fixes the UI testing wwwroot 2026-06-14 20:05:01 +01:00
e83ef7730b Merge branch 'refac/js-bundle' 2026-06-14 19:04:51 +01:00
4074c312a4 chore: stop tracking vendor lib files (now restored via npm + esbuild)
Drops 1038 files from src/Yavsc.Org/wwwroot/lib/ — they remain
on disk and are now restored via 'npm install' at build time
(see package.json and esbuild.config.mjs).

Exception: jonthornton-Datepair is not on npm, the bundled
files are kept in wwwroot/lib/jonthornton-Datepair/ as static
assets.

Also extends .gitignore to ignore:
- node_modules/, build/, package-lock.json (esbuild toolchain)
- wwwroot/js/*.min.js (regenerated by 'npm run build:js')
- .Production.env (added explicitly, not matched by '.*.env'
  glob in some git versions)

This aligns themeok with the architecture already in place
on refac/js-bundle (commits ed7522c5, 196f4b0b, 292c0a2f on
that branch). The build artifacts were already present in
node_modules/ and build/ on disk; this commit only stops
tracking them.

Tested: dotnet test 11/11 green (no C# code touched).
2026-06-14 18:58:38 +01:00
f750cf75a2 docs: correct CA3 tool from Playwright to Selenium 2026-06-14 18:58:02 +01:00
d454d4a513 An UI test 2026-06-14 18:53:14 +01:00
d0e594c359 synchro with main 2026-06-14 18:30:15 +01:00
26d36dee71 synchro w\ main 2026-06-14 18:26:40 +01:00
debb3231d3 fix(test): resolve ContentRoot path in WebServerFixture
The previous code computed the path as
  Path.Combine(BaseDir, "../../src/Yavsc.Org")
which from `bin/Debug/net10.0/` resolved to a non-existent
`test/yavscTests/src/Yavsc.Org` (two levels up, not four).
Kestrel logged:
  "The WebRootPath was not found: ... /wwwroot. Static files
   may be unavailable."

The fix walks up the directory tree from BaseDir until it
finds a directory that contains `src/Yavsc.Org`. This is
robust against the test runner changing the current working
directory (which it does: it runs from
`test/yavscTests/bin/Debug/net10.0`, not the repo root).

After this fix, UseStaticFiles correctly resolves the
wwwroot, so static assets under `wwwroot/` are served.

Note: this does NOT make the in-memory WebServerFixture
fully functional. Two pre-existing issues remain:
1. _Layout.cshtml references `~/css/site.css` but the
   actual file is now at `~/css/main/site.css` (moved by
   commit 31906a78). The .cshtml was not updated.
2. HomeController.Index() throws NullReferenceException
   on an empty EF Core InMemory database (no Activities
   seeded). UseDeveloperExceptionPage returns a 500 page
   that gets caught and re-rendered as 404 by the test
   client.
Both will be addressed in follow-up commits.

Tested: dotnet test 11/11 green (existing tests use
Services DI, not HTTP). UI tests not added yet (blocked by
the issues above).
2026-06-14 18:04:34 +01:00
b18e60979a docs: add trunk-cleanup challenge brief
Énoncé du défi : aligner main sur l'intention trunk qui a
déjà opéré sur themeok, libérer le dépôt du code inutile,
bien nettoyer CSS/JS, sans casser le JS et le CSS de
_Layout.cshtml. Introduire immédiatement des tests d'UI
automatisés comme garde-fou.

Le document contient :
- Énoncé du défi
- État actuel des 3 branches (themeok, main, refac/js-bundle)
- Résultats du diagnostic de main (cause racine : contenu
  vide + erreur JS sur carousel vide, pas un problème de
  fichiers servis)
- 6 critères d'acceptation vérifiables
- Stratégie de tests UI automatisés (Playwright C#)
- Plan d'attaque en 6 étapes
- 5 risques identifiés (cache navigateur, double binding
  Kestrel, .env non versionné, ports utilisés, quiproquos
  de branches)
- Todo court/moyen/long terme
- Annexes : environnement d'exécution, procédure make reinstall

Le diagnostic a été reproduit en worktree diag/main sur
ports 5060/5061, en surchargeant la config Kestrel via
variables d'environnement pour ne pas écraser le service
systemd yavscOrg sur port 3002.
2026-06-14 17:22:50 +01:00
ec5c1b6a95 fix(cookies): set Identity cookies to SameSite=Lax in dev (avoid Chromium rejection on http://localhost)
Chromium rejects cookies that have SameSite=None but no
Secure flag. The default Identity cookie policy uses
SameSite=None, which is invalid on http://localhost (no
TLS, no Secure). Result on http://localhost:5000:

  Cookie '.AspNetCore.Identity.Application' rejected
  because it has the 'SameSite=None' attribute but is
  missing the 'secure' attribute.

Fix: in Development environment, configure
ConfigureApplicationCookie and ConfigureExternalCookie
to use SameSite=Lax and SameAsRequest SecurePolicy.
Lax is permissive enough for OAuth callbacks (top-level
GET navigations) and avoids the rejection.

Production (https://) is untouched — the default
SameSite=None is correct when Secure is set.

Note on the sameSiteMode reference: SameSiteMode is
defined in two namespaces
(Microsoft.AspNetCore.Http and Microsoft.Net.Http.Headers).
The file already uses 'using Microsoft.Net.Http.Headers;'
so a bare 'SameSiteMode' is ambiguous. Using the
fully-qualified name 'Microsoft.AspNetCore.Http.SameSiteMode'
to disambiguate, no new using needed.

Tested: dotnet build OK, dotnet test 11/11 green.
2026-06-14 16:27:54 +01:00
aeccffebaa chore: remove Quill (out of scope for PostIt-driven editor)
Quill was never wired up on themeok (no .cshtml reference,
no @addTagHelper, no C# binding). It lived only as static
CSS/JS in wwwroot/ — dead weight in the repo.

The rich text editor for blog posts is PostIt (XPlat), not
the browser. Quill is no longer needed.

Removes:
- src/Yavsc.Org/wwwroot/css/main/quill.snow.css
- src/Yavsc.Org/wwwroot/css/main/quill.snow.min.css
- src/Yavsc.Org/wwwroot/js/quill.js
- src/Yavsc.Org/wwwroot/js/quill.min.js
- (also removed from disk, was untracked: quill.bundle.min.js)

Tested: dotnet test 11/11 green (no C# touched, but rule is rule).
2026-06-14 16:25:13 +01:00
b5fe6918a8 chore: snapshot of themeok branch as visual reference
This commit marks the current state of themeok as the
canonical visual reference for the upcoming theme
refactoring.

What this point of the branch represents:
- Bootstrap 5 (quartz theme) loaded via wwwroot/lib/bootstrap.quartz.min.css
- jQuery 3 + jQuery UI 1.14 + Bootstrap 5 JS bundle loaded from wwwroot/lib/
- New navbar partial src/Yavsc.Org/Views/Shared/_Nav.cshtml
  (Bootstrap 5 navbar-dark bg-dark with dropdowns)
- _Layout.cshtml loading the new navbar via <partial name="_Nav" />
- The WIP 'Js and css cleanup' (31906a78) — CSS vendor files
  dropped from wwwroot/css/ and moved to wwwroot/css/main/
  where appropriate
- The gitignore cleanup (ebfc3d77) — vendor lib files no
  longer tracked in the repo, restored via npm at build time

Out of scope for this snapshot:
- Home/Index.cshtml content (still empty container)
- Other view migrations to Bootstrap 5
- Quill removal
- Cookie SameSite=None fix in Program.cs
- jQuery-as-global-script refac (lives on refac/js-bundle
  branch, will be merged later)

Tested: dotnet test 11/11 green.
2026-06-14 16:15:19 +01:00