| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: migrate to tanstack-query | 3 个月前 | |
fix(orgs): stop org config saves reverting, and deep links bouncing to /dash Three production bugs, all from state that was read before it was ready. Org policy saves reverted: a config write that never loads its Organization — which is every org-policy save — missed the identity-map lookup in the cache hook. A miss returns None rather than raising, so the SQL fallback (which only ran on exception) never fired and the org-by-slug cache kept serving the pre-write config. The dashboard refetched right after saving, cached that stale copy for five minutes, and showed the old values back. - Run the slug lookup whenever the identity map misses, not only on error. - Serve the saved policy from a new admin GET that reads the database directly, so the settings tabs never depend on a cached org payload. Deep-linked dashboard URLs redirected to /dash on the first visit only: rights are derived per-org, and useAdminStatus reported loading=false as soon as the session resolved, while OrgContext was still fetching. No org meant no rights, which read as "not an admin" and triggered the redirect. It never recurred because react-query had the org cached by then. - Treat an unresolved org inside an OrgProvider as still loading. - Stop dereferencing a possibly-null org when redirecting to login. Also: an admin whose session predates the auth-method policy carries no recorded method, and the gate refuses that exactly like a disallowed one. The self-lockout guard skipped it, so restricting methods locked the admin out with no way back in. It now blocks the save and asks them to sign in again first. | 1 个月前 | |
feat: migrate to tanstack-query | 3 个月前 | |
fix: sort folders by org mode and hide certificate copy Folder content sorted by position only, ignoring org sort_mode, so dashboard drag order didn't match the public library page. Certificate copy was shown based on the learner's certificate row rather than whether the course has certification enabled, so uncertified courses displayed misleading "no certificate" warnings. Shared sort comparator: apps/web/lib/library/sort.ts. New gate: useCourseCertification hook. | 27 天前 | |
feat: migrate to tanstack-query | 3 个月前 | |
feat(i18n): resolve text direction from the active locale Adds the plumbing that makes direction a property of the language rather than something hardcoded, plus the codemod used to convert the codebase. Direction has to be resolved on the client. i18next's highest-priority detection source is localStorage, which the server cannot read, and reading the cookie in the root layout would deopt every page to dynamic rendering and still be wrong whenever the two disagree. So dir-init.js runs synchronously in <head> and writes lang/dir before the body paints — the same approach embed-bg.js already uses to avoid a flash. Its detection order mirrors lib/i18n.ts exactly, and the RTL list it carries is asserted against lib/direction.ts by a test, since it's a constant duplicated into a file the bundler never sees. AVAILABLE_LANGUAGES gains a `dir` field, so Persian works today and a future locale is a one-line change; nothing branches on "is Arabic". useDirection() exposes it to components along with a multiplier for physical offsets, and Radix's DirectionProvider makes align="end", collision flipping and arrow-key navigation direction-aware across ~40 call sites with no per-component edits. The codemod converts physical Tailwind utilities to logical ones. It parses with the TypeScript compiler API rather than running a regex over the file, because `pr-`, `mr-` and `pl-` appear in URLs, i18n keys and identifiers. space-x-*, divide-x* and inset-x-* are skipped — they already emit logical properties in v4 — and so is any 50% inset, which is a centering idiom whose paired translate may live in a sibling class or an inline style, and which lands off-centre in RTL if converted alone. Also drops tailwind.config.js. Tailwind v4 only loads it via an @config directive this project doesn't have, so it was dead — and a trap for anyone later adding an RTL plugin there. | 1 个月前 | |
feat: migrate to tanstack-query | 3 个月前 | |
feat: multi tenancy improvements | 4 个月前 | |
feat: multiple changes | 6 个月前 | |
fix(web): compute derived state during render instead of effect+setState Three "bucket A" cases from the set-state-in-effect triage in #800 - state that is purely derived from other state/props, where the effect+setState pattern renders twice (stale, then corrected) on every change: - useFeatureFlag: isEnabled is a pure function of org config + feature path; now a useMemo over the same traversal - TaskNumberAnswerObject / TaskShortAnswerObject: showSavingDisclaimer is exactly `studentAnswer !== initialAnswer` in student view; now computed inline. The post-submit `setShowSavingDisclaimer(false)` was already redundant (submitFC syncs initialAnswer on the same line, so the comparison flips by itself). react-hooks/set-state-in-effect: 5 fewer errors; tsc error set unchanged from base. The remaining errors in these files are the teacher-view context sync and fetch-effects (buckets B/C per the triage), intentionally untouched. | 3 个月前 | |
feat(cache): implement caching for organization and instance info retrieval | 5 个月前 | |
feat(web): dashboard UX — gating, leave-org, tooltips, first-chapter, Developers nav, usage upsell, delete-account danger zone, library sort UI | 2 个月前 | |
feat: migrate to tanstack-query | 3 个月前 | |
fix(web): certificate rendering, learner name & completion, plan gating, i18n Certificate PDF export + learner name/completion rendering, plan-gating helpers, and the assignment/autosave translation strings. | 1 个月前 | |
fix(feature-gate): let admins re-enable AI after disabling it Turning off "Enable AI Features" in Org Settings -> AI trapped admins on a "Feature Disabled" card with no way back: the toggle lived inside FeatureGate and vanished along with everything else it gated. On self-hosted the only way out was hitting the config API directly. FeatureGate now takes an opt-in allowWhenDisabled prop that suppresses just the admin-disabled card; plan gating still shows the upgrade card as before. OrgEditAI opts in and shows a notice when AI is off instead of hiding the switch. Gate branching moved into a pure resolveGateReason() so it's testable under bun, since apps/web tests have no React runtime. Also stopped useResolvedFeature from applying its plan fallback while the org is still loading: it was firing upgrade-shown analytics with a guessed plan before real entitlements arrived, including on public org pages. Added feature-gate-lockout.test.mjs (15 tests) and one i18n key in en.json/ar.json. eslint and tsc clean on changed files; not tested in a live browser. Fixes #1061 | 19 天前 | |
feat: migrate to tanstack-query | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 27 天前 | ||
| 3 个月前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 6 个月前 | ||
| 3 个月前 | ||
| 5 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 1 个月前 | ||
| 19 天前 | ||
| 3 个月前 |