Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .kubecoder/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ tools:
memory: 4Gi

secrets:
# Permanent token for https://issues.webathome.org. Only for checking the
# YouTrack plugin's REST calls with curl; nothing in the repo reads it.
# Permanent token for https://issues.webathome.org, for checking the YouTrack
# plugin's REST calls with curl and for the live fixture `kc project test`
# runs (read-only).
YOUTRACK_API_KEY_SECRET: youtrack-api-key

preamble:
Expand Down
22 changes: 15 additions & 7 deletions .kubecoder/project.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Curated entry points for TQL. Schema: https://kubecoder.home/help/reference/project-yaml/
#
# Every project in Tql.sln targets net8.0-windows (WPF + WinForms). It compiles on Linux
# through EnableWindowsTargeting (Directory.Build.props) with Microsoft's SDK, but nothing
# WPF runs here: not the app, and not the test projects, whose test host needs the
# Microsoft.WindowsDesktop.App runtime that only exists on Windows.
# Every project in Tql.sln but one targets net8.0-windows (WPF + WinForms). They compile
# on Linux through EnableWindowsTargeting (Directory.Build.props) with Microsoft's SDK, but
# nothing WPF runs here: not the app, and not their test projects, whose test host needs
# the Microsoft.WindowsDesktop.App runtime that only exists on Windows. The exception is
# tests/Tql.Plugins.YouTrack.Test, plain net8.0, which the test verb runs.

projects:
root:
Expand All @@ -22,9 +23,16 @@ projects:
# win-x64 section to each tracked packages.lock.json; NuGetLockFilePath keeps those
# lock files in obj/ instead.
- cexec dotnet dotnet publish src/Tql.DebugApp -c Debug -r win-x64 --self-contained -o build/DebugApp -p:NuGetLockFilePath=obj/packages.win-x64.lock.json
# test: deliberately unset. No test project can run on Linux (see the header), and CI
# runs none either. A WPF-free test project (plain net8.0) is the plan for the YouTrack
# plugin; see docs/Designs/YouTrack-plugin.md.
# The one test project that runs on Linux: the YouTrack plugin's WPF-free core, compiled
# into plain net8.0 (docs/Designs/YouTrack-plugin.md). The other test projects need
# Windows (see the header), and CI runs none. cexec passes the environment on to the
# dotnet container, so the live fixture runs too: read-only, against
# issues.webathome.org, with the environment's token.
test:
- >-
YOUTRACK_TEST_URL=https://issues.webathome.org
YOUTRACK_TEST_TOKEN="$YOUTRACK_API_KEY_SECRET"
cexec dotnet dotnet test tests/Tql.Plugins.YouTrack.Test
lint:
- cexec dotnet dotnet csharpier --check .

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ towards the first release.

## Features

- Support for Azure, Azure DevOps, JIRA, Confluence, GitHub, Outlook and
Microsoft Teams.
- Support for Azure, Azure DevOps, JIRA, YouTrack, Confluence, GitHub, Outlook
and Microsoft Teams.
- Built in plugin system to be able to add your own plugins.
- Quick start tutorial to get you up and running quickly.
- Advanced search capabilities. You'll forget how to use the web apps once you
Expand Down Expand Up @@ -83,6 +83,8 @@ available!
- The theme came from https://github.com/AngryCarrot789/WPFDarkTheme.
- Some icons came from https://github.com/microsoft/fluentui-system-icons
(search engine is at https://fluenticons.co/).
- The YouTrack plugin's category icons came from
https://github.com/JetBrains/icons (Apache License 2.0).
- The original grab cursor came from
https://www.svgrepo.com/svg/372329/cursor-hand-grab. The one I'm using is
modified to better support high DPI.
14 changes: 14 additions & 0 deletions Tql.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tql.Benchmarks", "src\Tql.B
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tql.Localization", "src\Tql.Localization\Tql.Localization.csproj", "{3BCD5CFB-31AD-42E5-BC08-40C38F63523E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tql.Plugins.YouTrack.Test", "tests\Tql.Plugins.YouTrack.Test\Tql.Plugins.YouTrack.Test.csproj", "{581A2C7D-0C4D-4B2D-8621-4834EC4378F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tql.Plugins.YouTrack", "src\Tql.Plugins.YouTrack\Tql.Plugins.YouTrack.csproj", "{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C6ED2573-EB45-49CB-BFD3-9D09A60BA23F}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Expand Down Expand Up @@ -137,6 +141,14 @@ Global
{3BCD5CFB-31AD-42E5-BC08-40C38F63523E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BCD5CFB-31AD-42E5-BC08-40C38F63523E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BCD5CFB-31AD-42E5-BC08-40C38F63523E}.Release|Any CPU.Build.0 = Release|Any CPU
{581A2C7D-0C4D-4B2D-8621-4834EC4378F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{581A2C7D-0C4D-4B2D-8621-4834EC4378F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{581A2C7D-0C4D-4B2D-8621-4834EC4378F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{581A2C7D-0C4D-4B2D-8621-4834EC4378F6}.Release|Any CPU.Build.0 = Release|Any CPU
{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -161,6 +173,8 @@ Global
{493C14D2-0DAF-4167-BC04-2023DF55AB45} = {E67CF545-0D68-469F-BD58-DAC8EDCE4562}
{E5226BB4-2336-40E5-8A8F-9B3F241AA459} = {094A034F-EBB5-42F1-A87B-633A3117042F}
{3BCD5CFB-31AD-42E5-BC08-40C38F63523E} = {094A034F-EBB5-42F1-A87B-633A3117042F}
{581A2C7D-0C4D-4B2D-8621-4834EC4378F6} = {E67CF545-0D68-469F-BD58-DAC8EDCE4562}
{1EC1CE1A-E99C-41AF-8EB6-05FEC29C9CA7} = {E67CF545-0D68-469F-BD58-DAC8EDCE4562}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {473D3E4B-C738-47D6-8D01-1D80FA3D6F49}
Expand Down
19 changes: 12 additions & 7 deletions docs/Designs/YouTrack-plugin.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# YouTrack plugin: design

Status: proposed, 2026-11-21. Nothing is built yet.
Status: built, 2026-11-21. The Windows test run (`specs/Plugins - YouTrack/`) is
still to do.

## Decisions

Expand Down Expand Up @@ -102,8 +103,9 @@ once there is more than one.

## Features

Paged lists use `$skip` and `$top`; every call passes `$top`, because YouTrack
returns 42 items when it is left out.
Paged lists use `$skip` and `$top`; every call passes `$top`, because the
default page size is not documented (measured: `/api/issues` returned 500 items
without it).

- **YouTrack Issues**: searched live with
`GET /api/issues?query=<text>&$top=100`. The text goes to YouTrack as a query,
Expand All @@ -126,7 +128,9 @@ returns 42 items when it is left out.
Measured on issues.webathome.org: YouTrack matches word prefixes without a
wildcard (`kubecod` finds "KubeCoder"), so the plugin never appends `*`. Doing
so could also break a query the user typed. `GET /api/issues/<id>` answers 404
for an issue that doesn't exist, and the search then runs as usual.
for an issue that doesn't exist, and the search then runs as usual. A half-typed
query such as `#Unres` or `state: Op` answers 400 with `invalid_query`; the
plugin shows no results for it rather than an error.

The people directory searches `GET /api/users?query=<text>&$top=100`. It leaves
out users without an email address, banned users and guests, and hands the rest
Expand All @@ -150,9 +154,10 @@ The project follows `Tql.Plugins.Jira` file by file:
JIRA plugin does), `IconCacheManager` and `YouTrackPeopleDirectory`.
- `ConfigurationUI/`: the connections list and the connection dialog.
- `Labels.resx`, `Labels.nl.resx` and `Labels.Designer.cs`.
- `Resources/`: Fluent UI System Icons (MIT, already credited in the README),
recoloured to `#B6C2CF` like the JIRA category icons, and the YouTrack product
icon from JetBrains' brand resources.
- `Resources/`: the glyphs YouTrack's own web app shows for each category
(JetBrains icons, Apache 2.0; the search glyph stands in for saved searches),
in the `#8496AD` YouTrack shows them in, and the YouTrack product icon from
JetBrains' brand resources.

These four files have no WPF or TQL dependencies, and the test project includes
them as linked `Compile` items:
Expand Down
45 changes: 45 additions & 0 deletions specs/Plugins - YouTrack/001-Installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
testspace:
title: Plugins - YouTrack / 001 - Installation
description: Install the YouTrack plugin.
---

{% if page %}{% assign spec = page %}{% endif %}

# {{ spec.title }}

{{ spec.description }}

{% include Setup/Clean-Setup.md %}

## Installation

{% include Setup/Local-package-source.md %}

Until the plugin is published, run it from the KubeCoder dev build instead. The
plugin is already loaded in that build, so skip the installation table below and
continue with **Verify installation**, which then only checks that the plugin is
present:

- Run `\\tqlapp-tql-49385e.home\work\TQL\scripts\Run-KubeCoder-Build.bat`. It
copies the build to `%TEMP%\TQL-DebugApp` and starts
`Tql.DebugApp.exe --env Debug` there.

For the published plugin:

| Action | Expected result |
| ------------------------------------------- | --------------- |
| Open the **Configuration** window. | |
| Navigate to **Application > Plugins**. | |
| Select the **TQL YouTrack Plugin** plugin. | |
| **Install** the plugin. | |
| **Restart** the application when requested. | |

## Verify installation

| Action | Expected result |
| ------------------------------------------------ | ------------------------------------------------------ |
| Open the **Configuration** window. | |
| Navigate to **Application > Plugins**. | |
| Switch to the **Installed** tab. | The **TQL YouTrack Plugin** plugin shows as installed. |
| Navigate to the **YouTrack** configuration page. | The configuration page opens. |
96 changes: 96 additions & 0 deletions specs/Plugins - YouTrack/002-Configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
testspace:
title: Plugins - YouTrack / 002 - Configuration
description: Configure the YouTrack plugin.
---

{% if page %}{% assign spec = page %}{% endif %}
{% include Configuration/Plugins/YouTrack.md %}

# {{ spec.title }}

{{ spec.description }}

{% include Setup/Run-App.md %}

A token is created in YouTrack under Profile, Account Security, New token, with
the YouTrack scope.

## Validate dialog

| Action | Expected result |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Open the **Configuration** window. | |
| Navigate to **YouTrack**. | The **YouTrack > General** page is highlighted. |
| **Add** a new connection. | The dialog has the fields **Name**, **URL** and **Token**. |
| Look at the help text of **URL**. | It reads "The address you open YouTrack on, e.g. https://youtrack.example.com or https://example.youtrack.cloud." |
| Look at the help text of **Token**. | It says where a token is made: Profile, Account Security, New token, with the YouTrack scope. The token is shown as a password box. |
| **Cancel** the dialog. | No connection is added. |

## URL copied from the address bar

| Action | Expected result |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| Open the **Configuration** window. | |
| Navigate to **YouTrack**. | |
| **Add** a new connection with the settings below. | |
| Click **Save**. | The dialog asks "Did you mean {{ youtrack_url }}/?". No exception shows. |
| Decline the suggestion. | The connection is not saved with the wrong URL; the dialog stays open or closes cleanly. |
| Click **Save** again and accept the suggestion. | The URL changes to `{{ youtrack_url }}/` and the connection is accepted. |
| **Cancel** the dialog. | |

- Connection settings:
- Name: `{{ youtrack_name }}`
- URL: `{{ youtrack_bad_url }}`
- Token: `{{ youtrack_token }}`

## Wrong token

| Action | Expected result |
| ------------------------------------------------- | --------------------------------------------------------------------------- |
| Open the **Configuration** window. | |
| Navigate to **YouTrack**. | |
| **Add** a new connection with the settings below. | |
| Click **Save**. | A plain message says the token is wrong. No exception or stack trace shows. |
| **Cancel** the dialog. | No connection is added. |

- Connection settings:
- Name: `{{ youtrack_name }}`
- URL: `{{ youtrack_url }}`
- Token: `wrong-token`

## Configuration

| Action | Expected result |
| ------------------------------------------------- | ------------------------------------------------ |
| Open the **Configuration** window. | |
| Navigate to **YouTrack**. | The **YouTrack > General** page is highlighted. |
| **Add** a new connection with the settings below. | |
| Click **Save**. | The connection is accepted without any question. |
| Click **Save**. | |

- Connection settings:
- Name: `{{ youtrack_name }}`
- URL: `{{ youtrack_url }}`
- Token: `{{ youtrack_token }}`

## Validate configuration

| Action | Expected result |
| -------------------------------------------- | --------------------------------------------------------------------------------- |
| Open the **Configuration** window. | |
| Navigate to **YouTrack**. | The **YouTrack > General** page is highlighted. |
| Highlight the connection and click **Edit**. | The settings conform to the settings below. The token is not shown in clear text. |

- Connection settings:
- Name: `{{ youtrack_name }}`
- URL: `{{ youtrack_url }}/`
- Token: `{{ youtrack_token }}`

## Validate authentication

| Action | Expected result |
| --------------------------------------------- | ----------------------------- |
| Open the app. | |
| Type in `youtrack`. | The YouTrack categories show. |
| **Enter** the **YouTrack Projects** category. | A list of projects shows. |
Loading
Loading