Nov 9, 2023 / šŸŽ¤ Thread View (experimental), Grid View improvements

Hi guys,

What are the chances that you will keep this feature in production? We use it on a daily basis and we really like it :heart: If we can keep using it, we can delete our old solutions and avoid clutter in the workspace.

1 Like

We have no intention to kill Thread View, our data shows that it is relatively popular as experimental feature, but I am not sure when we will make it real feature in a product as well, since it demands polishing.

5 Likes

Awesome :star_struck::star_struck:

1 Like

I did some experimenting with it, mainly thinking it would be interesting if you could build bots or AI agents through automations. I thought it also might be interesting if you could interact with the objects across the databases. Overall, I found it possible, but fairly cumbersome.

Main limitations I ran into:

Detecting User Comments

It is a little tricky to avoid creating an infinite loop where your bot responds to a message, then the bots response gets seen as a comment that it then tries to respond to itself. For a bot, you typically want to trigger off keywords in comments from users, and this just takes a bit of work at the moment.

Here is how I detected user comments:

  • Create formula field on the Topics database called ā€œUser Comment Countā€
  • Add this formula to it: Comments.Filter(Length(Author.Name) > 0).Count()
  • Add rule with a trigger on that field like this:

Detecting Keywords in Comments

Here you either get into custom scripts or complicated comment templates with embedded code within the template. I found that I really needed to use custom scripts because I donā€™t want to add a comment if the keyword isnā€™t detected in the comment. So, using the ā€œAdd Commentā€ action with a template doesnā€™t work for this use case. Here is a simple proof of concept to detect the command /capitalize items to capitalize, then return the capitalized text.

const fibery = context.getService('fibery');

// javascripts missing capitalize function
function capitalizeArray(arr) {
    return arr.map(function (str) {
        return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
    });
}

// returns any values after a given command string
function extractCommands(command, inputString) {
    // Split the string by command
    var splitArray = inputString.split(command);

    // Check if there is text after command
    if (splitArray.length < 2) {
        return []; // No text after command
    }

    // Split the text after command by spaces and filter out empty strings
    return splitArray[1].trim().split(/\s+/).filter(Boolean);
}

for (const entity of args.currentEntities) {
    // get the comments associated with the topic
    const entityWithComments = await fibery.getEntityById(entity.type, entity.id, ['Comments']);
    const allComments = entityWithComments['Comments'];

    // get the text from the latest comment
    const latestComment = allComments[allComments.length - 1];
    const doc = await fibery.getDocumentContent(latestComment['Document Secret'], 'md')

    // check if any commands were mentioned to process
    const commands = extractCommands('/capitalize', doc)

    // add comment with the response if we had a command
    if (commands.length > 0) {
        const comment = 'Capitalized: ' + capitalizeArray(commands).join(' ')
        await fibery.addComment(entity.type, entity.id, comment, '', 'md')
    }
}

This works, but I do get an error which I think is about not having a user id to reference. Adding comments through the ā€œAdd Commentā€ action seems to produce the same output. Is there not a System user or something along those lines?

Another Example

Here is an example of using the comment template to reference the same entity that the comment is being added to as a proof of concept adding a reference. The topic name is ā€œDealsā€ in this case. Both automations are active at this point:

2 Likes

@Illusory another insightful post, and as is often the case I agree with what you are saying! As another long-time user who primarily leverages comments in Fibery (we no longer use Slack, and in fact have basically eliminated internal Emails by setting up Fibery a certain wayā€¦), I think there are some even better ways comments can evolve to emulate Slack/Email/DMā€™s and give a team a full way to communicate around a companyā€™s work and context better than anything out thereā€¦

So with Threads, Iā€™m also not seeing a real movement forward here, similar to I think what you are saying. We already liberally use commenting in entities to communicate around them, so having the ability to essentially pin those comments to the left panel isnā€™t particularly useful. Iā€™m basically reiterating what you are saying here:

I think this could be solved if Comments evolved into another type of item in Fibery, you could call them ā€œconversationsā€ letā€™s say. I talked about this here (including a quote from @mdubakov about Fibery replacing Slack):

Iā€™d really like to see the ability for each comment to also live in Fibery on its own. Have a public ID, the works. We are constantly trying to respond to comments in one entity from comments in another entity - which is very useful because frequently you need to refer back to something in a related context. This feature could help with that, would be amazing if we could get it one day:

And this is all stuff I really ,100% back that would be a ton of help:

And you mentioned mobile as wellā€¦realizing the undertaking it is, for commenting and quick communication, itā€™s a must, so Iā€™ll link to that yet again :slight_smile:

Iā€™m excited for the direction all this is going and I know the Fibery team is in favor of much of this stuff!

5 Likes