Skip to content

Feature/template dynamic fields#1154

Draft
priosshrsth wants to merge 40 commits intofeature/client-association-prodfrom
feature/template-dynamic-fields
Draft

Feature/template dynamic fields#1154
priosshrsth wants to merge 40 commits intofeature/client-association-prodfrom
feature/template-dynamic-fields

Conversation

@priosshrsth
Copy link
Copy Markdown
Collaborator

Changes

  • ...

Testing Criteria

  • Test Criterias (explain how you did testing for this PR mentioning all the cases you tested for) [Loom](video link going through the test criteria)

Notes

  • Dependencies on other PRs, any required changes in config/setup to test behaviour, or links to external documents, threads, etc -- if any of them are required

Impact & Surface Area of Change

  • An overview of components behaviour to be looked at for unintended breaks after the changes. This will make regression testing easier and efficient.

…title (#1153)

* feat(OUT-3439): support dynamic fields and its conversion on task template title
@priosshrsth priosshrsth changed the base branch from main to feature/client-association-prod March 25, 2026 05:37
SandipBajracharya and others added 3 commits March 25, 2026 15:59
Add a "Dynamic Fields" section to the right sidebar of the template detail page.
Clicking a field chip inserts the token at the last cursor position in the title.
Uses a context provider to connect TemplateDetails insert handler with TemplateSidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Apr 2, 2026 11:58am

Request Review

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 25, 2026

Deployment failed with the following error:

Deploying Serverless Functions to multiple regions is restricted to the Pro and Enterprise plans.

Learn More: https://vercel.link/multiple-function-regions

arpandhakal and others added 2 commits March 26, 2026 12:26
…n sidebar card click

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SandipBajracharya and others added 5 commits March 26, 2026 14:16
    Replace contentEditable-based TokenizedInput with a minimal TipTap editor
    for template title fields, using Tapwrite's AutofillExtension for dynamic
    field tokens.

    Changes:
    - [x] Add TipTap dependencies (@tiptap/react, core, pm, extensions)
    - [x] Create TitleEditor component with minimal TipTap setup
      - Single-line (Enter blocked, single paragraph Document)
      - Extensions: Document, Paragraph, Text, History, Placeholder, AutofillExtension
      - No formatting, no slash commands, no lists
      - {{ trigger opens dynamic field dropdown (reuses TapwriteDynamicFieldDropdown)
      - Enter selects dropdown option when open, blocked otherwise
    - [x] Replace TokenizedInput in TemplateForm (create modal)
    - [x] Replace TokenizedInput in TemplateDetails (detail page)
    - [x] Remove unused refs, cursor tracking, sidebar insert logic from TemplateDetails
    - [x] Plain text conversion: editorToPlainText extracts {{tokens}} from TipTap JSON
    - [x] Font size override via !important to beat Tapwrite's .tiptap p CSS

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- [x] create dedicated hook for handling the editor logic (extensions, conversion utils, sync, key handling)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… description

- Expose TipTap editor instance via onEditorReady callback on TitleEditor
- Move onEditorReady useEffect into useTitleEditor hook
- Complete handleSidebarFieldInsert in TemplateDetails:
  1. Title focused → insert via TipTap editor commands
  2. Description focused → insert at DOM cursor via insertAutofillAtCursor
  3. Nothing focused → append to end of description HTML
- Re-register handler with DynamicFieldInsertProvider context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lateId from public API

- [x] resolve dynamic tokens using existing `resolveDynamicFields` and `resolveAutofillTags` when deserializing payload
…splay

- Replace plain text input with TitleEditor in NewTemplateCard so sub-template
  titles support dynamic field tokens ({{Current Month}}, etc.)
- Resolve dynamic field tokens in subtask titles and body when tasks are created
  from templates via the internal and public API (tasksShared.service.ts)
- Add DynamicFieldTitle component to render {{token}} patterns as styled inline
  chips in the sub-templates list on the template detail page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SandipBajracharya and others added 2 commits March 30, 2026 14:26
…c fields

- Add `getWorstCaseResolvedLength()` to dynamicFields.ts — replaces each
  {{token}} with its maximum possible resolved value (e.g. {{Current Week}}
  → "Week of September 30, 2026" = 26 chars) to compute the longest task
  title that could be generated from a template
- Add `createMaxLengthExtension()` — a ProseMirror plugin via TipTap's
  `addProseMirrorPlugins()` that runs `filterTransaction` to silently block
  any change that would violate either limit:
    1. Raw stored length > 255 (template VARCHAR(255) column)
    2. Worst-case resolved length > 255 (task VARCHAR(255) column)
- Wire `maxLength` prop through TitleEditor → useTitleEditor, defaulting
  to 255 so all template title editors are protected automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
maxLength is always 255 (the DB VARCHAR limit), so remove it as a
configurable prop from TitleEditor and useTitleEditor and move the
constant into useTitleEditor where the enforcement lives.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…emplate title

The autofill chip renders inside an inline-flex node view. Its border (1px top
+ 1px bottom) causes the flex item's box to exceed the paragraph line-height,
expanding the line box by 2px on every chip insertion.

Replace the chip's border with an outline scoped to the title editor context.
Outline is cosmetically identical (same color, follows border-radius in modern
browsers) but has no effect on layout, eliminating the shift without changing
the chip's size or padding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
arpandhakal and others added 6 commits March 30, 2026 16:31
When a filter (e.g. "My Tasks") is active, subtasks that match the filter
are now shown as standalone items if their parent task doesn't pass the
filter. Also adds accessibleTasks to the useEffect dependency array so
realtime subtask changes trigger re-filtering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tate and showArchived showUnarchived filter state, some general cleanups
Pass endOption and endOptionHref props to ListWithEndOption in noOptionsText
so the "Manage templates" navigation button renders when the template list is empty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OUT-2668, OUT-3181 | Show subtasks IU is assigned to in "My Tasks"
OUT-3200 | Improve experience when no templates exist while creating a task
arpandhakal and others added 2 commits March 31, 2026 14:04
OUT-3175 | Unable to Add Due Date to Task on iPhone Mobile Web App
The CopilotAvatar icon branch rendered a default MUI Avatar (40x40px)
while normal comment avatars use AssemblyAvatar xs size (20x20px).
This caused deleted parent comments to appear out of place. Map the
size prop to correct pixel dimensions for the icon avatar variant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants