ARC6.6 NAMED DX FILTERS - USER AND OPERATOR NOTES

WHY SAVE FILTERS?
Contest operators often want a different DX filter for each event:
a major weekend contest, a weekly session, or a particular mode.
Build and test the filter you want, then save it under a memorable name.
Reuse it next time without retyping a long expression.

Examples of names you might choose:
CQWWCW       CQ World Wide CW
CQWWSSB      CQ World Wide SSB
CWT Mini     A weekly CWT operating session
POTA         Parks on the Air spotting interests
Low HF       Your preferred lower-HF-band DX filter
High HF      Your preferred higher-HF-band DX filter

These are user-chosen labels, not built-in presets. Saving as CQWWCW
does not create or enforce contest rules. You control the expression:
bands, modes, spotter locations, skimmer choices and other supported
conditions. Check the contest sponsor's current rules for your activity.
WA7BNM Contest Calendar: https://www.contestcalendar.com/
The calendar provides contest schedules, including weekly events, and
links to official rules. ARC6 does not automatically switch filters by
calendar, identify contest participants, or determine contest eligibility.

EXAMPLE WORKFLOW
If live spots make command replies hard to follow, use SET DX OUTPUT OFF
before working with filters. When finished, use SET DX OUTPUT ON to resume.
These are optional manual commands; viewing filters never changes output.

BEACON FILTERING
Beacon is a Boolean DX-filter field for propagation-beacon spots. It uses the
same /B, /BCN, BEACON, NCDXF, standalone BCN and standalone IBP classification
as SET BEACON OUTPUT. The canonical field name is singular Beacon; Beacons is
also accepted when entering a command and is stored/displayed as Beacon.

SET BEACON OUTPUT OFF is the fast master switch and suppresses beacon spots
before the normal DX filter. With beacon output ON, expressions such as
SET DX FILTER NOT Beacon or SET DX FILTER Skimmer AND NOT Beacon can combine
beacon status with any other supported field. RBN/skimmer identity by itself
does not make a spot a propagation beacon.

1. Use SET DX FILTER <your expression> and verify the spots you receive.
2. SAVE DX FILTER CQWWCW
3. For another activity, set its expression and SAVE DX FILTER CWT Mini
4. LIST DX FILTERS
5. LOAD DX FILTER CQWWCW or LOAD DX FILTER 1 after reviewing the list.
6. Adjust the active expression and SAVE DX FILTER CQWWCW to overwrite it.
7. DELETE DX FILTER CWT Mini removes that saved entry; it leaves your
   currently active filter unchanged.

Names with spaces need no quotes. CQWWCW and cqwwcw refer to the same
saved name. Choose any name that meets the rules below, including a
contest, an operating activity or your own description of the filter.

FILTER LENGTH
The 25-character limit applies ONLY to the name. The saved expression
has the SAME 16,384-character limit as a normal SET DX FILTER expression.
Both paths share one limit constant and normal syntax/history validation,
including existing complexity and nesting checks. Named filters introduce
no smaller storage limit; ntext avoids the old 4,000-character truncation.
Saving captures the active expression as it stands, not a contest preset.

USER COMMANDS
SAVE DX FILTER <name>
LOAD DX FILTER <name or number>
LIST DX FILTER [callsign[-ssid]] or LIST DX FILTERS [callsign[-ssid]]
SHOW DX FILTER [callsign[-ssid]]
DELETE DX FILTER <name or number>
HELP SAVE DX FILTER (also HELP LOAD/LIST/DELETE DX FILTER)

Minimum command forms use SAve, LOad, LIst and DElete. The usual
spaces/slashes work: SA/D/F Evening CW. Names with spaces need no quotes.
Names contain 1-25 ASCII letters, digits, spaces, hyphens or underscores.
Leading/trailing spaces are trimmed and repeated spaces collapse to one.
Names compare case-insensitively. Names consisting only of digits are
reserved for numeric selection. Full callsign and SSID identify the owner;
K1ABC, K1ABC-3, K1ABC-03 and K1ABC-4 have independent collections.

Up to 50 names per identity. Saving an existing name overwrites it even
at the limit. Save commits immediately and reports success only after
commit. Saving an empty or whitespace-only active filter is rejected with:
No DX filter is set. Use SET DX FILTER before saving a named filter.
This also prevents an empty active filter from overwriting a saved entry.
Only the DX filter expression is saved, not other DX options.

LIST gives numbered, alphabetically ordered names, a copy-ready SET DX
FILTER expression under each name, and a count out of 50.
Numbers refer to the requesting connection's most recent OWN list. A changed
collection requires another LIST, preventing accidental selection after
renumbering. Named selection never requires a prior list. Loading applies
normal DX/history validation and CT1BOH availability checks; failure
preserves the active filter. Successful load shows a copy-ready SET DX
FILTER expression. A previously stored empty entry is identified in LIST
and rejected by LOAD without changing the active filter; it is not deleted.
DELETE removes the named entry and does not change the active filter.

DISPLAY COMPACTION
ARC stores and executes the fully expanded, validated filter predicate. User
commands display a shorter equivalent when the expansion is exact and can be
proved reversible. Frequency unions appear as FREQ WITHIN (...); exact built-in
contest recipes appear as {CW-CONTEST-FREQ}, {SSB-CONTEST-FREQ}, {CQWW-CW},
{CQWW-SSB}, {ARRL-CW} or {ARRL-SSB}. Field lists, excluded lists, Boolean terms
and wildcards also use their established concise forms. Ambiguous or mixed
expressions remain expanded. Copying the displayed SET DX FILTER command
recreates the identical stored predicate. This is presentation only: it does
not migrate or rewrite active profiles, named-filter rows or execution plans.
Shorter user-facing expanded-filter presentation suggested by Dave N3RD;
implementation and checks: NG7M.

SHARING FILTERS
Previously, many users kept contest filters under different SSIDs, such as
AA3B-3 for CWT and AA3B for daily DX chasing. Named filters make it easier
to keep several expressions under one login, and share them with friends
or a club's filter expert.

SHOW DX FILTER AA3B-3 displays that exact identity's current filter as a
copy-ready SET DX FILTER command. It can show an offline user's saved
profile, including the latest profile changes held in this node's cache.
Without an argument, SHOW DX FILTER retains the existing DX-options display.
Unknown callsigns and unreadable profiles return clear errors; viewing
never creates a profile or substitutes a new-login default.

LIST DX FILTERS AA3B-3 displays all that identity's saved names and
expressions. AA3B and AA3B-3 are separate identities. These optional
callsign parameters are always read-only: they change no filters, output
settings, login timestamps or stored records. Viewing another collection
does not replace the number mapping from your last own LIST.

To borrow a filter:
1. LIST DX FILTERS AA3B-3
2. Copy a displayed SET DX FILTER expression and issue it under your login.
3. SAVE DX FILTER CWT Mini
The result is your own independent copy. Later changes to the original
do not change yours. Numbers in someone else's list are for reference;
LOAD and DELETE always select YOUR own collection.

Ownership for SAVE, LOAD and DELETE comes only from a valid signed-in
local user session, including Telnet, ARC client and packet-user sessions.
Those commands do not accept an owner callsign parameter. This follows the
existing callsign-login model, including configured password protection;
it introduces no new authentication model or remote sysop privileges.

STORAGE AND UPGRADES
SavedDxFilter is in ArClusterLocalDb.sdf (the configured user database).
Id is a stable GUID; OwnerCall is the complete uppercase login identity;
Name preserves display case; NameKey is uppercase; FilterExpression is
ntext; CreatedUtc and UpdatedUtc are UTC timestamps. A unique composite
index on OwnerCall/NameKey provides both ownership lookup and name
uniqueness. No User table column or foreign key is added: legacy user
tables can allow null or duplicate Call rows.

UserProfileSchema.Ensure creates/verifies the table at startup before
listeners, and in the existing isolated upgrade filter-validation step.
Clean database creation includes the same schema. Migration preserves
existing active filters, XML profiles, other user fields and named rows.
Schema incompatibility fails clearly rather than silently enabling partial
storage. No upgrade rehearsal or deployed database was used for testing.

RETENTION AND DELETION
Existing user-retention age uses User.Dts, the inherited profile/login
activity timestamp; this feature does not redefine that field.
Retention first flushes pending cache updates, then deletes expired user
rows and their saved filters in ONE database transaction. Current/null-date
duplicate legacy user rows preserve their collection. Purged rows are
also removed from the cache so stale cache entries cannot recreate them.
Other cache-based user deletions delete owned filters in the same
transaction and retain pending cache changes on rollback for retry.
All operations use parameters and a shared in-process gate, including
quota enforcement, retention and numbered-selection mutation.

SOURCE COMPARISON
Compared latest decompiled SetDxFilter, UserCache, UserMaintenance and
UtilsDatabase under archive/recovery/experiments/deepsea-restored-renamed/source.
Also compared ShowDxFilter/ShowDxOptions and DX help: the inherited SHOW
FILTER alias discarded arguments and showed the requester's DX options.
Optional read-only target lookups and expression-sharing lists are new.
Recovered behavior stores one active expression in XML and persists a user
cache periodically. Inherited retention deleted only User database rows.
Named collections, immediate named save/delete commits, safe number
mapping, schema migration and atomic child/cache cleanup are intentional
new behavior. No equivalent legacy named-filter feature was found.

OPERATOR CHECKLIST FOR THE NEXT REQUESTED TEST BUILD
1. Set a filter, SAVE DX FILTER Evening CW, LIST DX FILTERS.
2. Change the active filter, LOAD DX FILTER Evening CW; verify expression.
3. Overwrite using different name capitalization; confirm one entry.
4. List, then load/delete by number; verify deleted entry does not change
   the active filter and a changed list requires re-listing.
5. Reconnect/restart and verify named entries persist.
6. Connect with a different SSID and verify independent empty collection.
7. Confirm missing names, invalid names, unknown names/numbers, and the
   51st new entry get clear errors; overwriting at 50 remains allowed.
8. SHOW DX FILTER <other call-ssid> and LIST DX FILTERS <other call-ssid>:
   verify expressions, independent identities and no changes to either user.
9. List your own filters, view another user's list, then LOAD your own
   number; verify it still selects your original entry.
10. Clear your active filter and try SAVE for a new and existing name;
    verify both fail and an existing saved expression remains intact.
11. SET DX OUTPUT OFF while managing filters, then SET DX OUTPUT ON;
    verify spot output resumes with the chosen active filter.
UI acceptance and installation remain operator-owned. No build publication,
remote installation, restart or synthetic public traffic is authorized.

REPEATABLE NON-UI CHECKS
tests/Test-SavedDxFilters.ps1 -Platform x64 -Build
tests/Test-SavedDxFilters.ps1 -Platform x86 -Build
Disposable SQL CE fixtures verify schema, persistence, limits, concurrency,
SSID isolation, rollback, cache deletion, actual handlers and command
abbreviations, and fallback with preserved legacy DI configuration.
Public manual and command-reference descriptions are maintained in landing-page/dist and its reference generator. Named-filter availability depends on the installed node software; legacy nodes may not support it.
