Repository navigation
refactor(stats): move service and add market plugins - #426
Merged
Merged
Conversation
The plugin download statistics service now lives in the standalone devlive-community/forgestats repository, which counts several applications. stats.toolforge.devlive.org already points at it and keeps the same routes, headers and receipts, so the desktop app and the docs site need no change. - remove apps/server, deploy/plugin-stats and the plugin-stats deploy workflow - the Plugins workflow keeps its catalog entry, which now forwards to ForgeStats
Overwriting the mapped cache file in place hangs on Windows (shared violation) and crashes with SIGBUS on Linux; the corrupt-cache case now uses its own path so the roundtrip test passes on all platforms.
The color and scratch-calculator locales lost their api.* summary/input keys and paper-box-templates missed paperLong/ paperShort when batch scripts rewrote the files, failing the convention rules check.
The convention rules require array params to declare scalar string items and reject object-typed params. Re-encode the structured params added by recent plugins into flat string encodings - key:value pairs, JSON-encoded element strings or line-based records - with the parsing moved into each plugin's Rust backend, and update the UIs, tests and manifest defaults to match.
New market plugin: normalize plates (case, dot/space separators), resolve the province abbreviation, issuing office letter, plate kind (standard/large/police/emergency/nev/large_nev) and energy type, validating length (7/8), the I/O-forbidden charset and the NEV serial letter segments. Closes devlive-community#252
New market plugin: parse nginx combined-format logs with an optional trailing request_time, aggregate status code classes, top IPs/URLs/user agents, per-minute request counts, slow requests above a configurable threshold and total bytes, skipping unparsable lines with a counter. Closes devlive-community#272
New market plugin: generate nginx server blocks for reverse proxy, static site and load balancing scenarios with optional HTTPS (ssl directives plus http redirect), gzip and WebSocket upgrade headers, validating ports, upstream formats and balancing strategies. Closes devlive-community#273
New market plugin: convert Apache .htaccess rules to nginx and back (RewriteRule/Redirect/RewriteCond flags), emitting one converted line per rule with semantic notes and flagging constructs the target syntax cannot express. Closes devlive-community#274
New market plugin: audit title/description length, heading hierarchy, image alt coverage, canonical, OpenGraph completeness, viewport and lang attributes, counting internal and external links and returning per-check pass/warning/fail grades with an overall verdict. Closes devlive-community#279
New market plugin: tokenize text (CJK split per character, latin words with stop-word filtering) and count 1-3 gram phrase frequency and density, highlighting optional target keywords with first occurrence position and exporting the table as CSV. Closes devlive-community#282
New market plugin: recursively validate ICU messages for unbalanced braces and quotes, duplicate select/plural branches, missing other branches and unknown argument usage, extracting the argument list and branch labels and flagging unsupported syntax constructs. Closes devlive-community#371
New market plugin: parse Cargo.toml [dependencies]/[dev- dependencies] tables and package.json direct dependencies into a node/edge graph with scope labels, DFS cycle detection, top fan-in ranking and a Mermaid flowchart export. Closes devlive-community#317
New market plugin: detect the OCF container magic, decode the zigzag varint header (metadata map, codec, sync marker, block count) and summarize .avsc schemas with field type trees, all parsed in the wasm sandbox without external dependencies. Closes devlive-community#368
Add a payment function (version 0.1.1) generating realistic payment test data: card numbers with a Luhn-valid check digit, test bank BINs, CVV, expiry and masked numbers, plus mobile and email fixtures, so checkout flows can be exercised without real accounts. Closes devlive-community#255
Wire the toc function into the outline panel (devlive-community#286): a toolbar button generates the table of contents and copies it to the clipboard, and the panel footer reports the anchor validation result with broken anchors and their line numbers. Ref devlive-community#286
New market plugin: convert between octal and symbolic permission modes with per-class explanation, special-bit rendering (s/S/t/T), risk flags for world/group writability and setuid/setgid, and a suggested conventional mode. Filesystem metadata inspection needs a stat host API and is out of v1 scope. Closes devlive-community#409
New market plugin: built-in templates (staged lint, conventional commit-msg, pre-push large-file guard, secret scan, test suite), source detection for pasted scripts (husky, pre-commit framework, plain sh) with command extraction, behavior notes and risk flags, plus installable script generation with a configurable size limit. Closes devlive-community#283
New market plugin: offline corpus of idioms (pinyin with tone folding so ASCII queries match, meaning, origin, example, synonyms/antonyms) searchable by keyword, initial and length, last-character idiom chaining with stuck-point reporting, famous quote search by fragment/author/title and copy-ready citations. Closes devlive-community#322
New market plugin: an offline character library (pinyin, tone, meaning, wuxing, strokes, classical sources) paired by tone contour and meaning keywords, honoring gender preference, generational characters and avoid lists, scoring candidates with explainable reasons and excluding bad full-name homophones. Closes devlive-community#296
New market plugin: lay out message lists into mockup SVGs for demos and docs - light/dark chat bubbles with time dividers and image placeholders, danmaku lanes on a dark backdrop, CJK-aware text wrapping and a repeated simulated-content watermark that is on by default and configurable. Closes devlive-community#295
New market plugin: five built-in festival templates (national day, spring festival, christmas, birthday, mid-autumn) drawn as rings with vector accents over a circle-cropped avatar image, embedded as a data URI with magic-byte mime detection and contain-side cropping, exported as SVG. Closes devlive-community#293
New market plugin: wrap screenshots into vector device shells - iphone/android/tablet/laptop/browser windows with bezels, laptop base and browser chrome bar, cover-cropped screen content via clipPath, optional solid background and 0.25-2x canvas scaling, exported as SVG. Closes devlive-community#294
New market plugin: detect raw XML, HTTP-POST base64 (with optional deflate) and HTTP-Redirect query strings, inflate and parse the SAML 2.0 document with roxmltree, extract issuer, ACS, audience, conditions, NameID and status, and compare against expected configuration with a validity-window check driven by a caller-provided now timestamp. Signature presence is flagged, verification is out of v1 scope. Closes devlive-community#366
New market plugin: byte-level read-only parsing of the three native executable formats - ELF (PT_DYNAMIC with DT_NEEDED and DT_RUNPATH via the string table), Mach-O load commands (LC_LOAD_DYLIB family with weak/reexport/upward marks, fat binaries reported as a note) and PE/PE32+ (import directory resolved through the section table) - reporting format, architecture, bitness, endianness and the declared library dependencies. Closes devlive-community#364
New market plugin: standard tone templates for wujue/qijue/wulu/ qilu with ping/ze openings and first-line rhyme option, per- character diagnostics (strict even positions, flexible odd positions), isolated-ping, triple-ping/ze ending detection and even-line rhyme group validation, backed by a curated sample tone and rhyme dictionary documented as teaching data. Closes devlive-community#346
Wrap the r/w/x badge letters in JSX expressions for the i18n lint rule and remove an unused map index in the name generator list.
New market plugin: offline curated prefix database mapping 7-digit number segments to province/city/carrier/card type with carrier-level inference as fallback, input cleaning for spaces, dashes and +86 prefixes, and order-preserving deduplicated batch output. The full prefix database is a data-only extension. Closes devlive-community#251
New market plugin: free-text Chinese addresses parsed into province/city/district/street/detail via longest-prefix matching over a curated division sample database, with omittable suffixes (province or city names resolve without them), municipalities treated as province-level cities, street extraction guarded against digit-bearing detail text and unmatched input preserved. Alias and renamed-division mapping are intentionally out of scope. Closes devlive-community#257
New market plugin: mapping patterns (dynamic|static with {name},
{name:d} digit and {?name} optional placeholders) compiled into
nginx rewrite directives, Apache RewriteRule/Cond pairs and IIS
web.config rule fragments, including digit constraints carried
from the dynamic side into the static regex and dynamic-to-static
301 redirects matching the query string in the written order.
Closes devlive-community#276
New market plugin: six built-in ID photo specs (one/two inch, visa, exam, resume square) with 300DPI pixel conversion, ratio- based center cropping via Lanczos resize, corner-sampled background color replacement with an adjustable distance threshold, and an optional 6-inch print layout grid, exported as PNG data URIs. Subject detection and hair-edge feathering are out of v1 scope. Closes devlive-community#305
Extend the locale set with ja-jp, de-de and en-gb: addresses formatted to local conventions (Japanese postal code with prefecture/city, German PLZ with street-first layout, UK postcode areas), phone numbers with country codes and local segmentation, zip formats and city fields per region. Names, emails and sentences fall back to the English dataset; localized name corpora are a data-only extension. Version 0.1.2. Closes devlive-community#256
Add an emoji function (version 0.1.3) to the character inspector: a curated corpus of popular emojis with Chinese and English semantic keywords searchable case-insensitively, returning the character, name, code points (including ZWJ sequences) and keywords, exposed as a new emoji tab with click-to-copy grid. Full CLDR keyword coverage is a data-only extension. Closes devlive-community#271
Add a wheel function (version 0.1.2) rendering the name list as a weight-proportional SVG prize wheel with palette-colored segments and a fixed pointer, drawing winners without replacement and excluding previous rounds' honorees so prize rounds accumulate (new wheel tab keeps the honoree list, per-round labels and a reset). Seed support keeps results reproducible. Closes devlive-community#291
New market plugin: a curated ~220-character dictionary converts Chinese text to pinyin in tone-mark, numbered or plain formats with per-character breakdowns, expands polyphonic characters to all readings on demand, and looks up homophones for a syllable (toneless queries match every tone). Unknown characters pass through and are counted; the full Unihan readings are a data-only extension. Closes devlive-community#297
Add a variable function converting Chinese phrases into identifier-safe names: dictionary readings become toneless pinyin tokens, ASCII runs are preserved (lowercased), digit-led names get a v prefix, and camel/pascal/snake/kebab/upperSnake styles are supported with an optional prefix. Exposed as a third tab showing the name and its tokens. Dictionary extended with common naming vocabulary. Closes devlive-community#266
Add a preview function (version 0.1.1) rendering ICU messages against sample name=value parameters: select matches branches with an other-fallback, plural/selectordinal honor =N exact matches and a simplified English one-rule before other, # placeholders resolve to the number and quotes escape literally. The UI gains a sample-params input showing the rendered output, branches taken and missing parameters. Full CLDR plural rules are a data-only extension. Closes devlive-community#371
Add a convert function (version 0.1.3): a curated ~600-pair 1:1 simplified/traditional character map (validated pairwise and de-misaligned by trimming same-form runs) plus a high-frequency mainland/Taiwan vocabulary table applied with longest-match before character mapping, covering s2t/t2s and cn2tw/tw2cn directions. Exposed as a new tab with per-direction buttons, replacement counts and copy. Many-to-many variant special cases are a data extension. Closes devlive-community#345
Add a currency category converting through a CNY base with built-in snapshot rates for 20 currencies (USD/EUR/GBP/JPY/ HKD/... noted in the catalog as a dated estimate), and build the missing plugin UI: category and unit selects driven by the catalog, value and precision inputs, a results list with click-to-reuse and copy, and a snapshot-date note for the currency category. Version 0.1.2. Closes devlive-community#300
Build the missing UI for the existing diff backend: two editors with file-picker inputs loading text via the host filesystem (docs, code, logs), a synchronized row table color-coding equal/delete/insert/change rows with inline emphasized segments, line numbers on both sides, and an aggregate stats header (added/removed/changed/unchanged and similarity). The debounced backend call keeps the diff live while typing. Closes devlive-community#265
Add a logFile setting (version 0.1.2): each request appends a combined-format line (remote, timestamp, method/URL, status, bytes) to the chosen file, buffered in memory and flushed every 50 entries and when the server stops via the sandbox file helpers. The UI gains a disabled-while-running path input next to the other settings. Closes devlive-community#275
Track continuous activity sessions (active run ended by the idle gap counts toward a per-day session list when long enough) and a configurable break reminder: after N minutes of uninterrupted activity the status flags a break (shown in settings with the current session length and today's session count), resetting once the rest gap is met. The threshold persists via the settings store and survives restarts. Session history persistence and notification toasts are v1 extensions. Closes devlive-community#415
Rework the shell toward the requested admin-style layout: the navigation state now keeps a list of open tabs (home pinned first), so several tools can coexist and stay mounted — switching tabs preserves each tool's state instead of losing it. A tab strip below the title bar shows open pages with close buttons, middle-click close and a per-tab menu (close / close others / close right). Sidebar spacing tightened (icon-text gap) and second-level entries indented further for clearer hierarchy. Closes devlive-community#421
Refresh Cargo and pnpm locks for the plugins already in the workspace. Keep pnpm on the format used by the pinned package manager.
Reduce linear memory reservations and compile WASM sequentially.\nLimit parallel Cargo jobs and development build artifacts.\n\nVerify memory growth and cache migration with runtime tests.
Inspect schemas and row group statistics with bounded file reads. Preview selected columns and rows with precise and nested values. Export CSV or JSON Lines with scoped access for CLI and agents. Refs devlive-community#358
Use translated labels and route tool opens through the active tab. Keep built-in tools available and publish online tools as they load. Preserve open views when refreshing or removing other tools.
The statistics service and deployment scripts now live in ForgeStats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动说明 / Summary
关联 Issue / Related issues
改动类型 / Type of change
已测试的平台 / Tested on
自查清单 / Checklist
cargo xtask check全部通过 / passes*_test.rs文件中 / Rust tests live in separate*_test.rsfileszh-CN与en-US的键一致;Rust 只返回错误码 / All UI text goes through i18n with matchingzh-CNanden-USkeys; Rust returns error codes only@toolforge/ui组件,没有原生控件或写死的颜色 / Only semantic tokens and@toolforge/uicomponents, no native controls or hard-coded colors新工具还需要 / For a new tool:
manifest.json中的 id 为org.devlive.toolforge.<name>,分类为已有分类之一 / The id isorg.devlive.toolforge.<name>and the category is an existing oneREADME.md与README.zh-CN.md的工具表中添加 / Added to the tool tables inREADME.mdandREADME.zh-CN.md截图 / Screenshots